Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Applet notinited

1 view
Skip to first unread message

Kristoffel

unread,
Oct 26, 2003, 11:56:49 AM10/26/03
to
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

Matt Humphrey

unread,
Oct 26, 2003, 1:21:59 PM10/26/03
to

"Kristoffel" <kdg...@yahoo.com> wrote in message
news:l1Tmb.108541$MO2.4...@phobos.telenet-ops.be...

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 ma...@iviz.com http://www.iviz.com/


Kristoffel

unread,
Oct 26, 2003, 2:42:50 PM10/26/03
to
Matt Humphrey wrote:
> "Kristoffel" <kdg...@yahoo.com> wrote in message
> news:l1Tmb.108541$MO2.4...@phobos.telenet-ops.be...
>
>>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'.
>
>
> 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

Roedy Green

unread,
Oct 26, 2003, 4:17:04 PM10/26/03
to
On Sun, 26 Oct 2003 16:56:49 GMT, Kristoffel <kdg...@yahoo.com> wrote
or quoted :

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

Make sure you used package "applets" and class "TestApplet"
consistently spelled including case, both inside the source, on the
file names, and in your Applet params.

See
http://mindprod.com/jgloss/errormessages.html#NOCCLASSDEFFOUNDERROR

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.

Andrew Thompson

unread,
Oct 27, 2003, 2:12:53 AM10/27/03
to
"Kristoffel" <kdg...@yahoo.com> wrote in message
news:_sVmb.108836$uE2.4...@phobos.telenet-ops.be...

> Matt Humphrey wrote:
> > "Kristoffel" <kdg...@yahoo.com> wrote in message
> > news:l1Tmb.108541$MO2.4...@phobos.telenet-ops.be...
> >
> >>I have developed an applet, and it works when I call it from a local
> >>html-file.

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.

--
Andrew Thompson
http://www.AThompson.info/
http://www.PhySci.org/
http://www.1point1C.org/


Tor Iver Wilhelmsen

unread,
Oct 27, 2003, 5:44:42 PM10/27/03
to
Kristoffel <kdg...@yahoo.com> writes:

> 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".

0 new messages