PDA

View Full Version : [SOLVED] Java: Another question about applets..



fallenshadow
October 16th, 2011, 08:54 PM
I have an applet that runs perfectly through the use of Netbeans... however when I put it on a webpage it fails to run... why is this?

Error in java console:

java.lang.NoClassDefFoundError: Test1 (wrong name: test1/Test1)

Ghostmn
October 17th, 2011, 01:41 AM
I have an applet that runs perfectly through the use of Netbeans... however when I put it on a webpage it fails to run... why is this?

Error in java console:

Just looking at the error, you didn't declare something properly.

Can you make a tarball of your source and attach it to a reply?

PaulM1985
October 17th, 2011, 09:10 AM
I would guess that when you created your applet in Netbeans you had it in a package. When you are trying to use your class in the webpage, your folder structure does not match your package structure.

Paul

ballantony
October 19th, 2011, 01:43 PM
How are you putting it on the webpage? Something like this?

<APPLET code="Test1/test1.class" width=350 height=200></APPLET>