• 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

java.lang.ClassNotFoundException help!!

 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi i'm getting this error when i try to load my applet. Its a swing applet and i am using the microsoft JVM - Its part of my requirement (to use MS jvm). My applet definition includes an archive, my codebase is correct.. HELP PLEASE..

java.lang.ClassNotFoundException: TagApplet
at com/ms/vm/loader/URLClassLoader.loadClass (URLClassLoader.java)
at com/ms/vm/loader/URLClassLoader.loadClass (URLClassLoader.java)
at com/ms/applet/AppletPanel.securedClassLoad (AppletPanel.java)
at com/ms/applet/AppletPanel.processSentEvent (AppletPanel.java)
at com/ms/applet/AppletPanel.processSentEvent (AppletPanel.java)
at com/ms/applet/AppletPanel.run (AppletPanel.java)
at java/lang/Thread.run (Thread.java)
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Its a swing applet and i am using the microsoft JVM - Its part of my requirement (to use MS jvm).



Ummm... dude... I think your requirements are going to have to change... the MS JVM won't run any Swing stuff... ( or any other Java 2 stuff either... )

Though I'm not sure why it's not able to find your actual applet, it should be throwing an exception on "class JApplet not found" or some such thhing. Looks like you may have other problems with finding your class, in addition to impossible requirements... Only other thing I can think to check is the manifest file in your JAR file. Is it pointing to the correct class?

-Nate
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
u should convert ur html and class file by using html converter.
download from www.java.sun.com
 
Charlie Boss
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm still getting this error..
do you know if my class files should have been compiled with MS java in order for the MS jvm to recognise my files or not.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No... any java class compiled by any java compiler will work in any JVM ( well, as long as the versions aren't radically different, and as long as all the class files are found. )

From the error message you got, it looks like the name of your applet is misspelled somewhere... it has to match in all these places:


  • The filename of the java file.
  • The name after class in your java code.
  • In the manifest file of your JAR.
  • In the HTML code.


  • Also, remember Java is case-sensitive... if you named your class tagApplet in one place, and TagApplet in another, Java doesn't know what you are talking about.

    -Nate
 
Ranch Hand
Posts: 424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The swing classes are mostly not yet supported by browsers (the same with microsoft additions). That means
you have to build a jar-file with all classes used by your applet (there
are tools for it) and then use the
archive="myJarForAllINeed.jar" as one of the applet parameters.
Thats what the problem looks like to me.
 
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Charlie:
I have been trying similar things, just #$%^ frustrated
Have you had any luck?
Please.....
thanks.
- satya
The references I am using are:
http://java.sun.com/docs/books/tutorial/applet/overview/test.html http://java.sun.com/docs/books/tutorial/applet/appletsonly/getParam.html
anyother helpful links please let me know. thxs.
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

knock...knock...please...
thanks
- satya
 
Charlie Boss
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sorry not yet.. luckily i didn't have to use the MS jvm. I'm interested in the answer though.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
javac -target 1.1 MyJavaClass.java
...this will compile the class to a target version acceptable to the older microsoft JVM version.
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Nexus Dream",
your display name does not comply the the Javaranch Naming rules described here.
We require your display name to be two words: your first name, a space, then your last name. Fictitious names are not allowed.
Please edit your profile and choose a valid display name. Accounts with invalid display names get deleted, often without warning.
thanks,
Dave.
reply
    Bookmark Topic Watch Topic
  • New Topic