Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Versioning in Java Web Start

does someone know what to specify in the JNLP file so that JARS won't be downloaded all the time, but only when there's a new version on the server side? I know i can specify: version="1.5" for exactly the version 1.5, or version="1.6+" for 1.6 or higher.

Let's take the case of version="1.6+". If the user has version 1.7 a JAR won't be downloaded, even if on the server the JAR keeps updating to 1.8, 1.9 and so on... I want the JAR to be downloaded but only when there's a new version on the server side. Can this be done?

Thanks, Teo

like image 524
Sandman Avatar asked Oct 12 '22 04:10

Sandman


1 Answers

what to specify in the JNLP file so that JARS won't be downloaded all the time, but only when there's a new version on the server side

By default webstart will check if you have the latest version of every jar file referenced in your JNLP. To avoid these often unnecessary checks, you can use the "version download protocol" .

You first need to name your application resources (jars etc) using the following naming convention <name of jar file>__V<version number>.jar
Next, you need to add the version attribute to the <jar> tag and then you version-enable your resources by setting the jnlp.versionEnabled to true in the JNLP.

This method will ensure that only the outdated jars are updated.

Details are given here

If, however, you do not wish to change your JNLP to modify the version numbers of the jars that have changed, then this option will NOT work for you and you will have to deal with default behavior of the WebStart that checks each an every resource to verify that you have the latest version.

like image 99
Ryan Fernandes Avatar answered Oct 18 '22 09:10

Ryan Fernandes