How do I pre-install Webstart applications?

Here’s the scenario:
I’ve got a CD, with Sun j2re1.4.2_01 on it, and my game, and an installer. I want the game to be launched from a local jnlp file and grab all the classes from the local installation - AND check the web for newer ones if there are any. Geddit? Webstart, with pre-installed applications. But how? Is this something to do with the “installer” apis in Webstart?

Cas :slight_smile:

This is essentially something I asked a few weeks back. I think what it comes down to is needing a version of JNLP that you can directly control, tell it to look here and there… run it just before your main() comes in.

OpenJNLP is a possibility, although I couldn’t get it to do what I’d like. The only other thing I’m considering is writing a light weight version of JNLP to only support the “normally used” features.

Kev

Kev is right. Web Start doesn’t allow this, but the JNLP spec would allow for it, I think. Grab an open source JNLP implementation and hack it.

Essentially you want to ‘pre-download’ or initialize Web Start’s cache. you might be able to hack the cache of Web Start… but it seems like a “bad idea”. If you had control over how the applications were stored - buy implementing the JNLP app yourself then it would be easy.

I think there should be a project for a JNLP core that we could put in our apps.

[quote]OpenJNLP is a possibility, although I couldn’t get it to do what I’d like. The only other thing I’m considering is writing a light weight version of JNLP to only support the “normally used” features.
[/quote]
What issues did you run into with OpenJNLP?

I used it as part of a JXTA-related project I was involved in to JNLP-enable services that are downloaded after the app has started, (the classic “web-start” no-good scenario) and this seemed to work out pretty well. That said, it was a relatively simple and straightforward use-case so I probably wasn’t trying to do anything as sophisticated as what you need for your game. I’m curious as to where one is likely to start hitting walls with OpenJNLP when trying to do fancier stuff.

TBH, I can’t remember. It was a month or so a go and I really didn’t spend much time looking at it (and didn’t keep my normal notes! - argh). I just have a vague recolation in my mind that something didn’t seem to be available…

I think I might need to revisit it for the current project and see if the same problem comes up. I’ll post back.

Kev

Further to this:

I revisited OpenJNLP to remember that it was simply the full bulk of thing that turned me off. I don’t really need a full compliant JNLP processor, I just want something that’d read what it needs and grab me some files.

And so… 3 hours ago I started writing one. It seems to work ok. Its available as a download here:

http://www.newdawnsoftware.com/martian/index.php?page=getit

Source is available if anyone wants it…

Kev

Was an RFE ever filed to allow the sort of thing Cas was after? I think it would make sense if there was a programatic way to install through Web Start, so clicking your apps icon to start it would benefit from the auto-update code that is already in Web Start.