Skip to main content

ClassNotFoundException

3 replies [Last post]
martinstam
Offline
Joined: 2008-01-02

under 1.6.0_03 from the following html file the applet runs fine

APPLET
code="basis.class"
archive="modellen_interface.jar"
width=1600 height=1200>

but with the same html and same java applet a ClassNotFoundException with Java Plug-in 1.6.0_10-ea:

basic: Added progress listener: sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@1f98d58
Applet status: load: class basis.class not found.
load: class basis.class not found.
java.lang.ClassNotFoundException: basis.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.Applet2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Applet2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Applet2Manager.access$2000(Unknown Source)
at sun.plugin2.applet.Applet2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.FileNotFoundException: I:\info\htdocs\weer\superinterface\modellen\basis\class.class (The specified path is invalid)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(Unknown Source)
at java.io.FileInputStream.(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$600(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 8 more
exception
Ignored exception: java.lang.ClassNotFoundException: basis.class

I think the following line is strange:

"Caused by: java.io.FileNotFoundException: I:\info\htdocs\weer\superinterface\modellen\basis\class.class (The specified path is invalid)"

the class "basis.class" is changed into "basis\class.class"

Have somebody an idea?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
kbr
Offline
Joined: 2003-06-16

I can't reproduce this in house with the current source code. I suspect you are running into a combination of 6643379, 6629341 and 6646578. You didn't mention what OS / browser and exactly which 6u10 build you're running. I believe you should be able to work around the problem by going into the Java Control Panel and clearing out any command-line arguments that are specified in your Java Applet Runtime Parameters. These issues should be thoroughly fixed in 6u10 build 11, which I believe is due out before the end of January.

martinstam
Offline
Joined: 2008-01-02

OS: Windows XP
browser: Internet Explorer 7
Java Plug-in 1.6.0_10-ea (I do not know where to find more specified info about the 6u10 build, but it was downloaded yesterday)

The reason to try 1.6.0_10-ea is the internet explorer maximum heap size limitation with 1.6.0_03 (and earlier versions)

and yes by clearing the Java Applet Runtime Parameters the applet is running fine again (but useless to me)

but also with the -Xms and -Xmx parameters set there are no problems (and now even with larger memory allocations, thanks!)
The applet(s) crashes as soon as the -Xmn parameter is added

I will try the-Xmn Runtime Parameter if 6u10 build 11 is available

(btw I could not find 6646578 in http://bugs.sun.com/bugdatabase/)

kbr
Offline
Joined: 2003-06-16

It turns out that -Xmn is not an officially supported command line option. It isn't in the documentation for the java command at http://java.sun.com/javase/6/docs/technotes/tools/windows/java.html , for example. I think it was added for compatibility with other vendors' JREs.

Still, I've filed RFE 6647029 about supporting -Xmn for unsigned applets, and will try to fix it for 6u10 build 11. In the meantime, you should be able to get the same effect by setting the supported -XX:NewSize=[value] and -XX:MaxNewSize=[value] arguments to the same value.

It sometimes takes a day or two for new bugs to show up on the bug database, which is probably why 6646578 isn't visible yet.