Using *.pack.lzma files in java webstart application

Started by BatKid, November 24, 2010, 18:12:49

Previous topic - Next topic

BatKid

Hi,

For lwjgl applets, the *.pack.lzma files are way smaller then the plain .jar files, which is great for download speed and such.  Is there a way for java webstart application to use the compressed version as well?

Thanks
Projects: 
   Env3D (http://env3d.org): Learn Java in 3D
   WhaleChat (http://whalechat.com): A 3D social programming experiment

kappa

You can't use the awesomeness of the LWJGL Appletloader with JWS :)

On a serious note, pack200/lzma is not supported by java web start out of the box. You can however use pack200/gz which comes pretty close to pack200/lzma.

If you must use pack200/lzma with JWS the only way I can think that it'd work is if you write a small loader on top of jws (much like how the appletloader works on top of the java plugin) which would start it self from jws and then download and extract the rest of your files. The code is available for Appletloader so you can starting hacking on it to create such a thing (much like what minecraft did).

A better way would be to use GetDown, its an alternative technology to JWS and generally works much better. It has support for pack200/lzma and its pretty stable and actively developed, its also used in many of the big commercial games from Three Rings and Oddlabs so its a further assurance that its a pretty solid tech.

jediTofu

cool story, bro

jediTofu

Also, the JCanyon source code (even though it's outdated) provides a good example of downloading (and in your case then unpacking the lzma) within Web Start.
cool story, bro

kappa

Quote from: jediTofu on November 24, 2010, 20:14:10
Quote from: kappa on November 24, 2010, 20:11:09
You can't use the awesomeness of the LWJGL Appletloader with JWS :)

Not even with applet-desc?

http://download.oracle.com/javase/1.5.0/docs/guide/javaws/developersguide/syntax.html#applet_desc

Yeh that'd work but would lack the awesomeness bit :)
Since the issues with jws are really its initialisation (jnlp files not being setup properly on the system) and download mechanism failing.

BatKid

Thanks kappa!  I'll experiment with pack.gz and see if the size is acceptable.  Alternatively, I could bundle both the lzma and the gz version so the user can choose the deployment format. 
Projects: 
   Env3D (http://env3d.org): Learn Java in 3D
   WhaleChat (http://whalechat.com): A 3D social programming experiment