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.)

Recommended Answers

All 6 Replies

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

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).

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.

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?

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.

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!

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.