Menu
|
I have a jws based application.
It is being deployed on a web server and the client downloads the file from the browser and runs it.
This creates a desktop shortcut and the applications runs perfectly.
It is being deployed on a web server and the client downloads the file from the browser and runs it.
This creates a desktop shortcut and the applications runs perfectly.
Now if I change some properties in the jnlp file on server and then run the installed application ( on client machine ) from desktop shortcut or from the downloaded jnlp file itself, it doesn't gets updated.
I have verified this on jdk version 1_6_30 and 1_7_21. These two releases seems to have resolved previous bug related to whitespaces in cache path.
Issue remains on Windows XP/7/8.
Issue remains on Windows XP/7/8.
Original jnlp file :
File Association. Normally, selecting a JNLP file should automatically open it using Java Web Start. If this doesn't happen, the file association may be missing or corrupted. You can change this through the Windows Settings menus. In Windows 8, you need to search for 'Default Programs' and select it from the results under 'Apps'. If the customer for some reason installs the software from the CD later, the 'timestamp' for the old.jnlp file is newer than of the actually newer.jnlp file's located on the server and therefore won't be updated. Is there any workaround other than just touching the newest.jnlp file on the server on regular basis (which seems idiotic)?
Updated jnlp file :
Change in java-vm-args does not gets reflected.
Update works if I re-download the jnlp file and then run from it. In this case the desktop shortcut still refers to the old one which is a pain :(
Update works if I re-download the jnlp file and then run from it. In this case the desktop shortcut still refers to the old one which is a pain :(
Verified the jnlp using JaNeLa.
EDIT:
![Jnlp Jnlp](/uploads/1/2/5/7/125773091/260195105.png)
This demo.jnlp also includes another feature jnlp (added in the blockquotes) which includes all the required jars for the application. Since on every update of the application this feature jnlp also gets updated but the same is not reflected on the client.
holmes840
holmes840holmes840
1 Answer
JWS has always been good at updating Jars, but ..less so when updating the JNLP files themselves. A dynamically generated JNLP would typically lack an
href
attribute to indicate to the Plug-In not to create a desktop shortcut. On the other hand a work-around might be found in the
IntegrationService
of the JNLP API. You might: - Cache a copy of the last known JNLP in the
PersistenceService
. - At app. start-up, connect back to the server and explicitly read the JNLP.
- Compare it to the cached version.
- If changed, uninstall the desktop shortcut & relaunch the app.
- If not changed, and no desktop shortcut exists, prompt to install (new) desktop shortcut.
Steps 2 & 3 might be replaced by a simple check of the headers for the URL connection for the JNLP, if the server returns a valid 'last updated' time.
Andrew ThompsonAndrew Thompson