Applet Problem...

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Jan 2008
Posts: 13
Reputation: USUAggie is an unknown quantity at this point 
Solved Threads: 0
USUAggie USUAggie is offline Offline
Newbie Poster

Applet Problem...

 
0
  #1
Apr 26th, 2008
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:

  1. <applet code="HangMan.class" archive="HangMan.jar"
  2. 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
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 9
Reputation: sukatoa is an unknown quantity at this point 
Solved Threads: 2
sukatoa sukatoa is offline Offline
Newbie Poster

Re: Applet Problem...

 
0
  #2
Apr 28th, 2008
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
Last edited by sukatoa; Apr 28th, 2008 at 10:55 am.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for Java
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC