Hello all,

Hello,

I am having a problem with a java applet i created, a hangman game, but I am having a problem I hope you all could help me out with.

I am able to run my applet in netbeans using f9 to compile and then shift-f6, and everything runs perfectly fine. However when I try to add it to my website it just doesn't work. It comes up as an empty box with an x in the top left and then when I go to the java console i get this message:

load: class HangMan.class not found.
java.lang.ClassNotFoundException: HangMan.class
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)


but i tried using both the .jar method and then just uploading all of my .java and .class files into a directory and then trying it that way....

this is what I have for the website:

<applet code="HangMan.class" archive="HangMan.jar"
width="300" height="200"></applet>

and it just doesn't work.... I have tried both using a .jar and also just uploading all the class files into the directory and doing it that way and still nothing...

Can you see what is wrong?

Here is my website link for example...

http://cc.usu.edu/~a01098213/game.html

Your hangman program runs well in my machine....

Testing your applet just after you have uploaded it on the host may come-up with that problem. Bec, the file that have been uploaded may still on the process at that time.

have you enabled your java?
What JRE version are you using?
If you are using Mac, you can read this for some time,

regards,
sukatoa

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.