Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6158799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T21:01:20+00:00 2026-05-23T21:01:20+00:00

I have a java applet that I would like to include in my ASP.NET

  • 0

I have a java applet that I would like to include in my ASP.NET page. The applet works on a regular old HTML page. When I try to include the applet in my ASP.NET page however, Java appears to start up (it shows the Java logo and the spinny blue circle), but an exception occurs for my main class:

load: class com.myclass.Main.class not found. 
    java.lang.ClassNotFoundException: com.myclass.Main.class

I am putting the applet in the page with the following code –

<applet
 code="com.xyz.Main.class"
 width="500"  height="500"
 archive="MyJar.jar"
>
    <param name="aParam" value="SomeValue"/>
</applet>

Note, this is exactly the same tag that I use to put the applet into a plain HTML page. I’m guessing that the reason for the class not found exception is that when ASP compiles the page it puts it somewhere else? If so, where? Note that I still have not actually deployed this page to a web server, it’s just running locally on my development machine.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T21:01:21+00:00Added an answer on May 23, 2026 at 9:01 pm

    Why not simply specify an absolute URI/oath to your applet with the codebase attribute? That way you would not have to worry about the vagaries of relative pathing of different systems.

    Also see here for a longer explanation. Excerpt:

    Specifying the Applet Directory

    By default, a browser looks for an applet’s class and archive files in the same directory as the HTML file that has the tag. (If the applet’s class is in a package, then the browser uses the package name to construct a directory path underneath the HTML file’s directory.) Sometimes, however, it’s useful to put the applet’s files somewhere else. You can use the CODEBASE attribute to tell the browser in which directory the applet’s files are located:

        <APPLET CODE=AppletSubclass.class CODEBASE=aURL
                WIDTH=anInt HEIGHT=anInt>
        </APPLET>
    

    If aURL is a relative URL, then it’s interpreted relative to the HTML document’s location. By making aURL an absolute URL, you can load an applet from just about anywhere — event from another HTTP server.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have an ages old Java applet that we want to move forward to
I have written a Java applet class and made a small HTML page to
I have a Java Applet that uses AWT. In some (rare) circumstances, the platform
I have a paint application that runs as a Java applet. I need to
We have a memory intensive java applet that runs in IE. The client is
We currently have a Java applet that generates a lot of data and uploads
I have a Java Applet that I'm making some edits to and am running
I have an applet, which I was writing in Java. Recently, I thought that
We have a Java Applet built using AWT. This applet lets you select pictures
Does Java have a built-in way to escape arbitrary text so that it can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.