JAVA web start download update in background

烈酒焚心 提交于 2019-12-10 18:33:37

问题


I have deployed an application using java web start. It is working fine. I've put in my jnlp file. Whenever the desktop shortcut icon is clicked it will check for the latest updates and download them before launching the application. But i want this update to be happen in background. So i make the following changes: . Now the application launches immediately after clicking on the shortcut. But i have faced the following problem:

After launching the application web-start starts a background update threads. It checks for any update and then download that updated jar. The problem is it updates the cache entry also without prompting the user to install the update. It causes my application to throw java.lang.SecurityException. But after restarting the application everything works fine.

I actually want to notify the user before updating the cache entries. I've tried all the options in the jnlp(prompt-run, prompt-update). But nothing is working as per my expectation. I want to check whether any update is available on the server or not and if available then prompt user to download the user. Download will happen in background and once done it will notify the user. User then should be prompt to install the updates.

Please inform me if anyone has achieved something like this. I'll be grateful for any kind of help. Thank you..

来源:https://stackoverflow.com/questions/5088110/java-web-start-download-update-in-background

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