Webstart problems

I’ve been following Kev’s rather handy webstart tutorial to get my app webstart-able, but can’t seem to get the last bit done. My current effort is http://co-project.lboro.ac.uk/users/cojc5/Webstart/VecriptEditor.jnlp but it exits straight after downloading the jars, no error message and nothing in the webstart log. :frowning:

The server is returning the correct MIME type, I’ve recoded my app to load resources from jar files. I’ve also packaged up Jogl and its native libs into jars and signed and uploaded everything.

But I can’t find a good way to figure out whats going wrong, looking in the webstart cache and all the files seem to be there, and its unpacked the jogl dll into its own dir (which is how Wurm is in my cache as well).

I think its my main class - the tutorial doesn’t mention it, so i when hunting though Wurms webstart. I ended up adding a main=“true” in the appropriate jar tag, and a main-class=“com.vecript.core.Vecript” to the application-desc at the bottom. I’ve also got the main class specified in the manifest of the appropriate jar file as well.

So what am i missing? Anyone any ideas?

Well, after a bit of deduction :slight_smile:

I tried the webstart, it did what you said. Infact it appears to be running fine.

So… I downloaded your files manually and ran the jar with:

java -jar VecriptEngine.jar

Which appeared to do nothing also… until I noticed Log.html (you can find what I got out at http://www.cokeandcode.com/Log.html).

It seems to fail because of missing preferences or something. Anyone, I check in

C:\program files\java web start

and found another Log.html, which seems to imply your web start is work fine :slight_smile: but you code isn’t :(.

Hope this helps,

Kev

Heh, you beat me to it - seems the initial problem was that you need to specify ‘+editormode’ as a command line arg or a valid .scene filename otherwise it just quits. I added the editor mode flag to the jnlp and it actually starts up now, I think you just got in after i’d added it. :slight_smile:

Checking in my own program file\webstart dir doesn’t show my log file though :o Whats the proper practice for such things? I don’t want to clog up a users root dir with my own files.

Missing prefs isn’t a problem, it’ll load in defaults if not found, and create the config file on exit for next time (again, where should a webstart app put these?).

Top stuff! Jumped too early :slight_smile:

Um, config files, well as far as I know there is no standard practive. I generally just detect users home directory, create a “.” directory and stick the preferences in there.

Kev

There is the PersistenceService. Can be usefull even though it was meant for untrusted applications: http://java.sun.com/products/javawebstart/docs/javadoc/index.html

The PersistanceService looks a little too restrictive, the idea behind the log and config files is that they’re human readable (and editable for the config) so they need to go somewhere concrete. I’ve taken Kev’s method of a sub dir in user.home, and that works well enough.

Surprisingly its only taken about 3 or 4 days to totally convert from a stand-alone app to a webstart one (mainly lots of resource loading that had to change). Its very nice to be able to just repackage and upload and have it all work without any hastle. :slight_smile:

Webstart: It Just Works TM

Oh, from now on the link above will be the current dev. version if anyone feels like giving it a try. The UI is probably pretty confusing to anyone but me but feel free to tinker if you want. ;D

I had a play earlier, got really confused. :slight_smile:

Kev

PS. Welcome to God’s country.