wood burning stoves*
The moose likes Applets and the fly likes jdk 1.1.8 applet gives ClassNotFoundException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "jdk 1.1.8 applet gives ClassNotFoundException" Watch "jdk 1.1.8 applet gives ClassNotFoundException" New topic
Author

jdk 1.1.8 applet gives ClassNotFoundException

Anoop Krishnan
Ranch Hand

Joined: May 03, 2001
Posts: 163
I compiled my applet in jdk 1.1.8 and try to view it using IE browser disabling Sun JVM and enabling MS JVM.
I am not able to view the applet it complains java.lang.ClassNotFoundException for the applet class
Works fine with the Sun JVM.
Any idea what went wrong with MS JVM.


I just want to know is there any body call my bean's Getter and Setter methods with "Please" in front - My favorite quip from Bugzilla
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8836
    
    7

Is it JApplet that is causing the problem? JApplet doesn't exist in the 1.1.8 api.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Anoop Krishnan
Ranch Hand

Joined: May 03, 2001
Posts: 163
Thanks for your reply
but I am using java.awt.Applet if I use JAPplet I won't be able to compile the
classes.
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8836
    
    7

That's true. It's early in the morning for me, so bear with me. Is the JVM not finding java.awt.Applet or your extension of java.awt.Applet?
Anoop Krishnan
Ranch Hand

Joined: May 03, 2001
Posts: 163
I call the applet in an html file as follows

<applet codebase="applet" code="com.company.project.myclass" width=791 height=569 hspace=0 vspace=0></applet>

and when I load the applet I see the following in the MS Java console.

Error loading class: com.company.project.myclass
java.lang.NoClassDefFoundError
java.lang.ClassNotFoundException: com.company.project.myclass
at com/ms/vm/loader/URLClassLoader.loadClass
at com/ms/vm/loader/URLClassLoader.loadClass
at com/ms/applet/AppletPanel.securedClassLoad
at com/ms/applet/AppletPanel.processSentEvent
at com/ms/applet/AppletPanel.processSentEvent
at com/ms/applet/AppletPanel.run
at java/lang/Thread.run

but when I enable Sun JVM no problem !!!
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8836
    
    7

Interesting. I was able to duplicate that behavior by compiling with JDK 1.5.0. The MS VM comes up with a "class not found" error. Now if I compile with the command:

I can bring the applet up in IE with the MS VM. Maybe check your javac version to make sure you are using the one you think you are using:

or use the 1.5 compiler to generate a backwards-compatable class.
Anoop Krishnan
Ranch Hand

Joined: May 03, 2001
Posts: 163
It worked ..........
I was using Eclipse to compile my code.
I used workbench defaults for javac which was 1.4 javac
but I used jdk 1.1.8 in my classpath.
When I changed the javac to 1.1 it worked
Thank you very much for your tips.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jdk 1.1.8 applet gives ClassNotFoundException
 
Similar Threads
display html page in applet
Qualities of JDK 1.1.8 (MS JVM)
Applet - ie5 version problem
awt applet java version issue
Where can I download jdk 1.1.4 ?