• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

jdk 1.1.8 applet gives ClassNotFoundException

 
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is it JApplet that is causing the problem? JApplet doesn't exist in the 1.1.8 api.
 
Anoop Krishnan
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 163
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 163
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic