Java-Gaming.org Java4K winners: [ by our judges | by the community ]         
Featured games (67)
games approved by the League of Dukes
Games in Showcase (∞)
games submitted by our members



News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  Print  
  Webstart problems  (Read 1582 times)
0 Members and 1 Guest are viewing this topic.
Offline Orangy Tang

JGO Kernel
*****

Posts: 2960
Medals: 37


Monkey for a head


« on: 2003-11-16 06:16:44 »

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

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?

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline kevglass
« League of Dukes »

JGO Kernel
*****

Posts: 5214
Medals: 49


Mentally unstable, best avoided.


« Reply #1 on: 2003-11-16 06:32:07 »

Well, after a bit of deduction Smiley

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 Smiley but you code isn't Sad.

Hope this helps,

Kev

Offline Orangy Tang

JGO Kernel
*****

Posts: 2960
Medals: 37


Monkey for a head


« Reply #2 on: 2003-11-16 06:38:48 »

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

Checking in my own program file\webstart dir doesn't show my log file though Shocked 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?).

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Games published by our own members! Go get 'em!
Offline kevglass
« League of Dukes »

JGO Kernel
*****

Posts: 5214
Medals: 49


Mentally unstable, best avoided.


« Reply #3 on: 2003-11-16 06:52:08 »

Top stuff! Jumped too early Smiley

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

Kev

Offline tom

JGO Neuromancer
****

Posts: 1113
Medals: 5



« Reply #4 on: 2003-11-16 07:33:21 »

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

Offline Orangy Tang

JGO Kernel
*****

Posts: 2960
Medals: 37


Monkey for a head


« Reply #5 on: 2003-11-16 12:24:27 »

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

Webstart: It Just Works TM

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline Orangy Tang

JGO Kernel
*****

Posts: 2960
Medals: 37


Monkey for a head


« Reply #6 on: 2003-11-16 12:26:55 »

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

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline kevglass
« League of Dukes »

JGO Kernel
*****

Posts: 5214
Medals: 49


Mentally unstable, best avoided.


« Reply #7 on: 2003-11-16 12:30:03 »

I had a play earlier, got really confused. Smiley

Kev

PS. Welcome to God's country.

Pages: [1]
  Print  
 
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.147 seconds with 20 queries.