Skip to main content

Using appletviewer to Test Applet

1 reply [Last post]
jeffbruce
Offline
Joined: 2008-06-05
Points: 0

I am trying to launch my applet from within my java bin directory to test it, but I can't surmount this error:

C:\Program Files\Java\jdk1.6.0_03\bin>appletviewer applet.html
java.lang.NoClassDefFoundError: classes/theclass (wrong name: theclass)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
4)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:155)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:127)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:618)
at sun.applet.AppletPanel.createApplet(AppletPanel.java:780)
at sun.applet.AppletPanel.runLoader(AppletPanel.java:709)
at sun.applet.AppletPanel.run(AppletPanel.java:363)
at java.lang.Thread.run(Thread.java:619)

applet.html looks like:

In my bin directory I have 3 folders:
jars
images
classes

classes does contain theclass.class
jars contains images.jar, classes.jar, jl1.0.jar
all of these jar files are signed and verified.

I'm really in a clinch here and I would appreciate any help no matter how big or small. Thanks guys.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jeffbruce
Offline
Joined: 2008-06-05
Points: 0

Obviously it seems that theclass.class is not being found properly, but I can't understand why. Seems like the .class extension is lost when I try to load it.