LWJGL Web Start

I’ve created a Web Start demo that uses LWJGL and I’m wondering what’s the best way to do it. I used the JNLP files from the LWJGL demos as starting point, so I’m referencing the LWJGL libs from http://lwjgl.org/jnlp in my JNLP file. Is this ok?

One problem I encountered is that you can’t reference Jars signed with different keys in the same JNLP file. I solved this by creating an extension JNLP file for LWJGL, which can be viewed here. Maybe you can provide this extension on your site as it makes using LWJGL in Web Start much easier, or do you have some other preferred method of including LWJGL in a Web Start app?

I think it would make a lot of sense if we here linked to the jar files and jnlp files of the lwjgl libs on the lwjgl site. This would allow webstart to use a single copy for all games, i.e. it wouldn’t need to download a new copy of the same files just because the creator of an app had to sign them locally.

This would also allow people to ‘by default’ trust the jar files from the lwjgl.org website and you’d only need to trust them once, they’d know that these files would be safe, not a hacked copy that I may have written that deletes your harddrive when you call glBegin().

Andy.

Yes. Also making an extension JNLP file available makes it a lot easier for people to use LWJGL in their Web Start apps. They don’t have to sign the LWJGL jars themselves (I think you still have to sign your own Jar because of “all-permissions”), and they don’t have to worry about the platform specific LWJGL sections of the JNLP file. Plus all apps would automatically support all new platforms when they are added to the LWJGL extension JNLP file. Basicly you just put


<extension name="LWJGL Extension" ref="https://.../lwjgl_ext.jnlp"/> 

in your JNLP file and you’re done.

When we reach 1.0 we will sign the distribution with a proper certificate.

Cas :slight_smile:

So, the answer is you won’t put up an extension JNLP file before 1.0?

Something like that. The problem is that we have to maintain an extension file, because if we keep changing the jars at will, we will break someones code if they depend on it.

a versioned extension?

Kev

yeah - but I’d have to litter the website with some 10-50 releases of lwjgl, which I’d rather not. And besides lwjgl is meant to be included in your own distribution… We would also save considerable bandwidth - and people wouldn’t be dependent on whether lwjgl.org is online or not…

And besides lwjgl is meant to be included in your own distribution.

lwjgl is <200kb for 1.5 (pack200/gzip) and like ~300kb for 1.4 (zip). I don’t think it’s a big deal to include it with each project.

In the meantime, I’ll happily put an extension JNLP on the JGF server if someone will sign it (I’m really poor at signing the damn things, which is part of why I want an automatic thing to do it for all JGF games).

I’ve been long wondering whether we ought to insist that all JGF hosted games use extensions hosted on the JGF server (if, for instance, lwjgl.org goes offline for a couple of days, lots of games will suddenly “break”) rather than the ones on the relevant tech’s own domains. If you can’t get to the JGF server, you can’t see the link to play the game anyway :).

It’s trivial for the authors to do in addition to their normal webstart (you just change one line to make a JGF JNLP), and hopefully we’ll even have it automated at some point.

I can make an LWJGL JNLP extension file you can use (I have one that works). You don’t have to sign the JNLP file, only the Jar files referenced from it (lwjgl.jar, lwjgl_win32.jar etc.).

Maybe it would be best if you created a key for JGF and used that to sign the Jar files. That way you can use the same key/certificate for all Web Start Jar’s you provide on your site and the users only have to trust your certificate. Signing a Jar is quite easy, first create a key (all command line tools are found in the JDK bin directory):


keytool -genkey -alias <key alias>

Then to sign a Jar file using the key:


jarsigner <jar-file> <key alias>

Or you can use the “signjar” task in Ant.

About versioning, maybe it’s sufficient to provide the latest version of LWJGL, otherwise you could provide one extension file that always uses the latest version (lwjgl_latest.jnlp) and extension files that uses a specific version of LWJGL (lwjgl_.jnlp).

When I get my Thawte cert sorted out I’ll provide a signed JAR file in the meantime that you could use as an extension.

Cas :slight_smile: