Applet notinited

K

Kristoffel

I have developed an applet, and it works when I call it from a local
html-file.
But, when I call it from a webserver, my browser (mozilla 1.4 & IE6)
give me the error 'applet TestApplet notinited'. In the logs of the
webserver (vqserver), I read that the applet was sending (with correct
number of bytes).

This is the error in the java-console:
java.lang.NoClassDefFoundError: /applets/TestApplet (wrong name: TestApplet)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

what do I wrong?

regards,

K
 
M

Matt Humphrey

Kristoffel said:
I have developed an applet, and it works when I call it from a local
html-file.
But, when I call it from a webserver, my browser (mozilla 1.4 & IE6)
give me the error 'applet TestApplet notinited'. In the logs of the
webserver (vqserver), I read that the applet was sending (with correct
number of bytes).

This is the error in the java-console:
java.lang.NoClassDefFoundError: /applets/TestApplet (wrong name: TestApplet)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

The browser JVM cannot find your applet class. Is the fully qualified name
TestApplet (is there a package name?) Are the class files / jar in the right
place. Show the HTML (applet tag at least) so we can see if you've
configured it correctly.

Cheers,
Matt Humphrey (e-mail address removed) http://www.iviz.com/
 
K

Kristoffel

Matt said:
The browser JVM cannot find your applet class. Is the fully qualified name
TestApplet (is there a package name?) Are the class files / jar in the right
place. Show the HTML (applet tag at least) so we can see if you've
configured it correctly.

<applet CODE="/applets/TestApplet.class" WIDTH="400" HEIGHT="300">
</applet>

there is no package-declaration in TestApplet.java

regards,

K
 
A

Andrew Thompson

No time to help with your problem Kristoffel
(it seems you've got some assistance already),
but I will leave you with one thought..
'An URL paints a thousand words'

When asking for help with an applet, it is so
much easier when the helpers can _surf to_
the applet.
 
T

Tor Iver Wilhelmsen

Kristoffel said:
java.lang.NoClassDefFoundError: /applets/TestApplet (wrong name: TestApplet)

You need to set the "applets" directory as the codebase. The code
attribute take a fully qualified class name, and yours is just
"TestApplet".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top