java web pages

java web pages

by Ron Walker -
Number of replies: 10
have a web page (crossword) which is interactive : it doesn't run apparently because it cannot locate the relevant .jar file (which is there). Any ideas?
Have created a totally different directory with only the relevant files in and it still doesn't work.
Average of ratings: -
In reply to Ron Walker

Re: java web pages

by John Isner -
I'm sure the solution is simple, but you haven't described the problem in enough detail for anyone to help you. Please take the time to explain: How was the Web page created, where is the directory, and what is in the directory?
In reply to John Isner

Re: java web pages

by Ron Walker -
I've created an interactive web page for a crosswork (using crossword kit). This program produces a .html page, a .jar file and another .jpw file (with the questions and clues in it). When this is run from my memory stick or a drive on my computer, it works fine.

When I upload the three files to moodle in the root directory for a particular course or when I create another directory solely for these three files and then add it as a resources, it fails to run.

Java console says it cannot find the applet (called crossword.jar).

I have tried changing the java link so that it expressly says the same directory but this too doesn't work.

Its a really good piece of software which produces wordsquares and crosswords and works fine when I use it at school on a shared directory.
In reply to Ron Walker

Re: java web pages

by John Isner -
Let me see if I understand. In the Files area of a particular course, you have three files: foo.jar, foo.jpw, and foo.html. When you say you added "it" as a resource, I assume you mean that you created a "Link to a file or Web page" resource pointing to foo.html. When you say "it" fails to run, I assume you mean that when you click the resource, the html page is displayed, but it contains a broken applet tag. Besides clarification on these still-unclear details, it would be helpful to see the full applet tag.
In reply to John Isner

Re: java web pages

by Ron Walker -
Thanks for restating the problem but have now identified why there is a problem at all - when I put all the relevant files into a folder on a web site, it works fine. Moodle does not actually create "folders" in the conventional sense as in directories/subdirectories - these are virtual with links to where they actually are. Thus putting all the relevant files in what in moodle appears to be a directory is nothing of the sort.
In reply to Ron Walker

Re: java web pages

by Robert Brenstein -
Actually, using files under admin does create real folders on the server. However, for security reasons, these are not accessible directly from web browsers. Instead, you have to go through files.php to get to them. So you have to either rework the links to jar file to work through file.php or put the jar in a publically accessible web space elsewhere.
In reply to Robert Brenstein

Re: java web pages

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Java is my subject but it is about 2 years since I played with using applets in Moodle. Check out the following link so you can see that it can be done

http://www.examulator.com/moodle/file.php/2/FlowAp.html

Note that uses Java as a class not a Jar but I don't think that should make any difference. If you still cannot get it to work I am willing to take a look at your system, or if you send me the jar I will have a go at setting up on a moodle installation of my own.

Marcus
In reply to Marcus Green

Re: java web pages

by Eduardo Reis -
I'm having the same problem with a jar.
I've put
<APPLET code="ArdoraPanel.class" archive="sistemafeminino.jar"
codebase="http://face.esb.ucp.pt/moodle/file.php/85/" width=720 height=330></APPLET>

But it continues to not be able to load the class inside the jar and if I try to access the url http://face.esb.ucp.pt/moodle/file.php/85/sistemafeminino.jar I can download the jar.
Any suggestions?
In reply to Marcus Green

Re: java web pages

by Jeff Forssell -
Your link
http://www.examulator.com/moodle/file.php/2/FlowAp.html
doesn't work for me in Firefox but it does in Internet Explorer.
In reply to Jeff Forssell

Re: java web pages

by Jeff Forssell -
Strange. surprise Today it is working in Firefox also. Has anything been changed? Hope I haven't sent anyone on a "wild goose chase".
In reply to Jeff Forssell

Re: java web pages

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
For me FireFox is the 1 true browser and thus it is the main one I use for testing so I don't know what the problem might be. I have not changed anything there for a year or two.