This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Applets and the fly likes ClassNotFoundException - Applets/ Swings Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "ClassNotFoundException - Applets/ Swings" Watch "ClassNotFoundException - Applets/ Swings" New topic
Author

ClassNotFoundException - Applets/ Swings

Supradeep Makam
Greenhorn

Joined: Jan 14, 2009
Posts: 11

Hi,

I have a application built using applets and swings. This application is invoked from a html file (<applet code="pkg.util.MyApplet.class" width=256 height=256 archive="swiftsapp.jar"></applet>). I made some code changes and rebuilt the jar , when i invoke the application using new jar file i am getting the following exception.

If i replace the new jar with old jar then the application is working fine.


java.lang.ClassNotFoundException: pkg.util.MyApplet.class
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.FileNotFoundException: \pkg\util\MyApplet\class.class (The system cannot find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at sun.net.www.protocol.file.FileURLConnection.connect(Unknown Source)
at sun.net.www.protocol.file.FileURLConnection.getInputStream(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 7 more


Any help in this regard will be appreciated.


Thanks,
Supradeep
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19543
    
  16

Moving to Applets.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Supradeep Makam
Greenhorn

Joined: Jan 14, 2009
Posts: 11

Issue got resolved. That error was because of incorrect manifest.mf file.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ClassNotFoundException - Applets/ Swings
 
Similar Threads
Cannot load applet
Problem with an applet
My applet is not being seen in its jar anymore. Please help!
FTPclient by org.apache.commons hangup...
Applet throwing exception when running it through web browser