Welcome to WebmasterWorld Guest from 54.144.68.27

Forum Moderators: phranque

Message Too Old, No Replies

NoClassDefFound Error while running an applet

     

Tanushri

1:05 pm on Dec 14, 2009 (gmt 0)

5+ Year Member



Hi,

I downloded the source code,MouseEventDemo.project from the link:
[java.sun.com...]

And the extracted folder is present in the bin folder of java in my system.
The java files are getting compiled but when i try to run the html file,BlankArea.html which contains only this much code,
(<applet code="BlankArea.class" height="200" width="300">
</applet> )

I get the error :

load: class C:\Program Files\Java\jdk1.6.0_17\bin\events\BlankArea.class not found.
java.lang.ClassNotFoundException: C:.Program Files.Java.jdk1.6.0_17.bin.events.BlankArea.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.net.MalformedURLException: unknown protocol: c
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 7 more
Exception: java.lang.ClassNotFoundException: C:.Program Files.Java.jdk1.6.0_17.bin.events.BlankArea.class
java.lang.NoClassDefFoundError: BlankArea (wrong name: events/BlankArea)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
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)
Exception: java.lang.NoClassDefFoundError: BlankArea (wrong name: events/BlankArea)

Please guide me where i went wrong.

Thanks,
Tanushri.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month