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.
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...