Applet, JNLP. Force update jar files

╄→гoц情女王★ 提交于 2019-12-11 14:28:53

问题


How I can force updating of my jar files when client open applet application? Jar files always cached in client machine. And I always need to clear cache using Java Control Panel.


回答1:


I always need to clear cache using Java Control Panel.

This is probably because the JWS client does not recognize the Jars as being new. One source of such confusion lies in the difference in time-zone between the developers machine and that of the server. In that case, the Jars will typically update within the next 24 hours.

For the purposes of testing, do it outside a browser.




回答2:


If your problem is that old versions of the files are present after redeploying new versions, then consider having a form of timestamps or build numbers in your jar file names.

This will require you to update your JNLP file for every deployment, but your cache problems should go away. It did for us.




回答3:


Version your jars in your applet tag with each build / deploy. This will force a reload.

ARCHIVE="foo-1.0.16.jar" > ARCHIVE="foo-1.0.17.jar"



来源:https://stackoverflow.com/questions/12053733/applet-jnlp-force-update-jar-files

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!