Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

java webstart no cache

How to avoid Java webstart not cache jar files ?

In development, I want to avoid cache in java webstart. In my lanuch.jnlp, if every time, I change the jar version number , it will force to download new jar, instead of using its cache ?

Thanks.

<jar href="myjar1.jar" main="true" version="031720111507"/>
<jar href="myjar2.jar"  version="031720111507"/>
like image 512
user534009 Avatar asked Dec 03 '25 18:12

user534009


1 Answers

The Java Webstart will send an HTTP HEAD request to the server to get hold of the timestamp of all of the required .jar files. That is, you don't even need to update the version-numbers for Java Webstart to realize that the cache is outdated.

Quote from here:

(Using basic protocol) Web Start sends out an HTTP HEAD request for every jar in your app's XML startup file to check the timestamps of the latest and greatest jars stored on the server against the jars stored in your Web Start cache. Thus, breaking your app into more jars results in more HTTP HEAD requests and may slow down the initial update check.

like image 95
aioobe Avatar answered Dec 05 '25 08:12

aioobe



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!