JWS in JRE 1.6u24 installed on users' machines has this bug which doesnt update/downlaod the modified JNLP and all of the new jar files. Here is the discussion on coderanch:
Now to solve this problem we have decided to upgrade the JREs on users' machines to 1.6u33. However when I install it, it causes the apps' shortcut to disappear which is unacceptable to the users.
Why is this happening?
Edited by: 942535 on 26/06/2012 20:52
That is an old buggy behavior especially on windows XP.
Every time the current JRE is upgraded all shotcurts are removed, but not the applications...
This issue has been signaled a lot of times without getting any fix yet (about 3 years If I remember)
There is a workaround. Rename programmaticaly the shortcut by adding a space character or any other character you want in the shortcut name. That will prevent this one to disappear.
Of course the bad sides is that you cannot anymore modify the shortcut icon, and this one will remain if the end user uninstalls your application. but it's better than losing your shortcut every time jre is updated
Many thanks Claude for the response. I did exactly that by appending an underscore, upgraded the JRE and renamed the shortcut back to oriinal hence no change from users perspective.
However, I ran into another issue which was equally bad or worse. When the shortcut was used the first time, JWS will download all of the modified and new jar and native libs as per the modified JNLP and run the app without any problems. Any subsequent click on the shortcut will result in JWS exception where JWS is unable to find the file in the cache. Initially I noticed its happening once in a while but then later realized its everytime. I concluded that its JRE and App upgrade one after the other which is causing this as the app changes are drastic in terms of new and upgraded jars.
So I changed the approach and have decided to not go for JRE upgrade and simply execute a script (javaws -uninstall <JNLP> and javawx -import -shortcut -silent <JNLP>) on all 700 machines dispatched via SCCM as a one off just after our app deployment. This script will run for all profiles on the machine at a scheduled time. If the user is no logged in then will run when the user logs in next time.
Indeed, I have forgotten to warn you about that. Sorry
However, JNLP allows using other jnlp as extension and so the main jnlp does not need to be modified involving that the shortcut will continue to work.
<j2se version="1.3+" />
<jar href="jdiskreport.jar" />
<j2se version="1.3+" initial-heap-size="32m" max-heap-size="128m"/>
<jar href="lib/mypackage.jar" download="lazy"/>
<jar href="lib/mailicep.jar" main="true" part="plexmailer" download="eager"/>
<extension name="SUN Crypto jar files" href="plexmailer_sun_crypto.jnlp"/>
<extension name="SUN JSEE (SSL) files" href="plexmailer_sun_jsse.jnlp"/>
<extension name="SUN LDAP files" href="plexmailer_sun_ldap.jnlp"/>
<extension name="SUN Mail jar files" href="plexmailer_sun_mail.jnlp"/>
<extension name="Apache jar files" href="plexmailer_apache.jnlp"/>
<extension name="Misc jar files" href="plexmailer_3rd.jnlp"/>
<package name="com.plexobject.*" part="plexmailer" recursive="true"/>
those JNLPs cain contains JAR definition and Native livrary as well.
But be careful, if your application can work in standalone mode too such structure could be not run anymore... another bug appeared within one of the so numerous jre upgrading. Maybe this one has been fixed.
You have to test.
Once installed, turn off your Internet access, launch the application, quit, launch it again.. If that still works that means this issue has been fixed otherwise, your application will not work anymore until the next connection to internet; that will involve the reloading of some jars...