Question

Every time we update our Java application (Java client and Java server) we have the problems that some clients approx. 1% - 2% does not load the new jar files. This occur with applets and also with Java Web Start. If you clear the Java Cache then all is working correct.

Any idea why Java does not check for new jar files on every start?

Was it helpful?

Solution

This can be problematic to resolve but there is an easy workaround for this. Instead of relying on correct cache-update, just make sure that JAR file names include version / build number of the application. JAR files for new version of applet will then effectively live on other URL (you also have to change the bootstrap web-page).

OTHER TIPS

I've been there and the only solution which is 100% guaranteed to work is to have a different path/url to your resources(jars, images, etc). Nobody can guarantee that cannot be bugs in the caching mechanism(if you look in the JDK change list every 2-3 releases there is something related with caching mechanism of jars) .

So go with that(just append last modified time as string at the end of the jar url) and you will not have any problems:

Ex : http://myserver/applet/codebase/your_jar.jar?v=2487387543434 and next version it will be http://myserver/applet/codebase/your_jar.jar?v=343438534545455 <- this is jar's last modified time.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top