Reputation: 13
Currently I am trying to embed a Java applet onto a webpage, and the only result I get is the java logo spinning and an empty loading bar.
I can't tell if its an error in my Java code or if I did something wrong with the HTML file.
Here is what I have for HTML.
<applet>
archive="game.jar"
code="BRANDON.GameApplet.class"
width=800
height=600
</applet>
BRANDON is the package I created with the rest of my files and GameApplet is the class which has the applet necessary methods. The game.jar is located in the same location as my HTML file, and the GameApplet class file is located in the jar within the BRANDON folder. The applet runs just fine in eclipse when told to run as an applet so I can't imagine it being a problem with the Java code.
My suspension is that it is a problem with file placement but every variation I try comes up with similar results. Anyone know what the mysterious loader means, and what I am doing to cause it?
Thanks to anyone who might answer.
EDIT: Just enabled the developer console and the only output it gives me is:
APPLET tag missing CODE parameter.
I don't know how much this helps.
Upvotes: 0
Views: 954
Reputation: 75396
Enable the Java Console so you can see the error messages and take appropriate action.
edit: You need it inside the applet tag
<apple code="..." ...>
now it is just some text inside the tag.
Upvotes: 3
Reputation: 4238
My suspicion is that your class files are simply not being found, though I don't have enough info to know for sure. Some thoughts:
Upvotes: 0