954,518 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

HTML file can't find my applet!!!

I am writing a applet-based mini-game. Whenever I open up the HTML document with Internet Explorer to test what I have so far, it just says "Java Applet Load failed".When I do the same with the AT&T browser, I get a blank web page with a big grey rectangle (or BGR) (which is NOT what I was looking for). Whenever I mouse over the aforesaid BGR, the message bar at the bottom tells me that the class file was not found, and I have a feeling it's in the syntax. Can anyone point out what is wrong with the following???

<html>
<head>
<title>Soluna Invasion!</title>
</head>

<body>
<applet code="C:\Documents and Settings\MyNameDeleted\My Documents\Programming\Soluna Invasion\SolunaInvasion\SolunaInvasion.class" width="750" height="500" alt="Artix thought this applet was undead and exorcised it. Try again.">
Artix thought this applet was undead and exorcised it. Try again.
Seriously, someone has got to explain to that Paladin what is undead and what is not!
You saw what happened on Frostval against Xanta Claus, right?
</applet>
</body>
</html>


(Yes, I'm making a mini-game to send to Artix Entertainment.)

venomlash
Junior Poster
143 posts since Oct 2006
Reputation Points: 86
Solved Threads: 2
 

Is your HTML file located in "C:\Documents and Settings\MyNameDeleted\My Documents\Programming\Soluna Invasion\SolunaInvasion\SolunaInvasion.class"??

Phaelax
Practically a Posting Shark
858 posts since Mar 2004
Reputation Points: 92
Solved Threads: 51
 

The HTML file? No, the actual JAVA class file is in there. And the setup is basically how the AP book says should work, but in the book they don't have the full filepath, just the filename (i.e., no folder names and backslashes).

venomlash
Junior Poster
143 posts since Oct 2006
Reputation Points: 86
Solved Threads: 2
 

You mixed up code and codebase a little bit. Try this:

<applet code="SolunaInvasion.class" codebase="C:\Documents and Settings\MyNameDeleted\My Documents\Programming\Soluna Invasion\SolunaInvasion\" width="750" height="500" alt="Artix thought this applet was undead and exorcised it. Try again.">
</applet>


Use 'code' to specify the class, and use 'codebase' to specify the path of the class file when not contained in the same folder as the HTML file.

Phaelax
Practically a Posting Shark
858 posts since Mar 2004
Reputation Points: 92
Solved Threads: 51
 

Oookay, still not workin'.
Now says "class driver not found" unstead of giving me the entire pathname.
I actually am supposed to give it "driver", not "Soluna Invasion" as the class, so I found that bug.
Do you think it's the whitespace in the pathname screwing it up?

venomlash
Junior Poster
143 posts since Oct 2006
Reputation Points: 86
Solved Threads: 2
 

Class files can only be loaded from the same source as the html.
When running in AppletViewer that can be the filesystem, when running in a browser security settings may well prevent that.

jwenting
duckman
Team Colleague
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
 

Okay, I switched to the compiler-generated HTML file and used Internet Explorer, and I get something but it's not painting so well. Thanks!

venomlash
Junior Poster
143 posts since Oct 2006
Reputation Points: 86
Solved Threads: 2
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You