Hi John,

I am not sure if I understand you correctly: You tried the applet in a 
"normal" HTML-page (HTML + all .class-files and .gif-files in one 
directory) and it worked. Uploading all the stuff to the swiki and the 
images are not shown?
Do you get Java-exceptions (in Netscape "Tools>Java Console")?

Maybe it is easier to build a jar and use something like this:

<applet code=TheAppletClass archive=theArchive.jar>


Cheers,

felix


John Hinsley wrote:

> Still trying to get more complex Java applets to run in Swiki ;-)
> 
> It seems that "simple", "flat" java applets (no internal directory
> structure, just a simple, single, class file) are relatively simple to
> run in Swiki (although until I saw Felix Franz's demonstration of how to
> do it, I struggled).
> 
> I'm now trying to put some games on an experimental Swiki. Some of these
> consist of multiple classes and multiple directories.
> 
> The one I'm struggling with a the moment is my favourite Java
> implementation of Hangman. (this is one of the early Sun demonstations,
> and --- I warn you now -- does not run under IE, at least on Windows,
> due to the M$ security nonsense). It's to be found in a package called
> "other", somewhere on the Java Sun site.
> 
> Now, since Swiki (or the browser) cannot upload directories, I've
> re-arranged this from its 3  directories ( audio/  classes/  images/ )
> with two subdirectories within images/ (  dancing-duke/ and 
> hanging-duke/ ) into a completely flat structure, so that all the files
> are in the uploads directory for that particular page. I've also
> re-written the source to reflect that. 
> 
> As this latter step was always likely to be a bit dodgy (especially with
> my hands at the wheel!), I podged together the html for the (revised and
> flattened) applet and popped it in the uploads directory for the page
> (snippet only):
> 
> <object>
> <applet code="Hangman.class" width=325 height=175>
> alt="Your browser understands the &lt;APPLET&gt; tag but isn't running
> the applet, for some reason."
> Your browser is completely ignoring the &lt;APPLET&gt; tag!
> </applet>
> </object>
> 
> This works fine.
> 
> But the same code doesn't "quite" work in the Swiki. What seems to be
> happening is that the draw methods works fine: the gallows gets drawn
> and the letters appear when typed in from the keyboard, but the images
> (which are all .gifs) don't get loaded. 
> 
> Any ideas? Thinking it might be a memory issue, I'm running Comanche
>>from a Squeak vm with 60mb.
> 
> Cheers
> 
> John 
> 



Reply via email to