Mathew Broughton

Greenhorn
+ Follow
since Oct 03, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Mathew Broughton

Fear not I have answered it myself. If you get hold of the JnlpClassLoader and from that retrieve the com.sun.javaws.jnlLaunchDesc object, i.e:

LaunchDesc launchDesc = jnlpClassLoader.getLaunchDesc();

Then the LaunchDesc object holds the location of the cached jnlp file (well indirectly, I copied the following helper method from com.sun.javaws.LocalInstallHandler to get the jnlp location).


Why there isn't more functionality available on the IntegrationService itself I don't know.
13 years ago
Good Morning,

I have my web start app working fine and now need to go a bit beyond the basics\conventional.

Basically I would like to programmatically - in my web start app - retrieve the location of the client cached jnlp file* as stored in the auto created desktop shortcut target (on windows at least); usually as something like:

C:\Windows\SysWOW64\javaws.exe -localfile "C:\Users\matb\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\1\60d71e41-5efb04d0"

It would appear the IntegrationService is almost what I need with its methods to determine if the jnlp app has desktop or menu shortcuts. However the IntegrationService has very limited exposed functionality.

Does anyone know the best way to do this? The information must be available somewhere as JWS created the shortcut. A quick look through the source code indicates I may have to make use of the com.sun.deploy.cache package myself - but I am hoping there is another easier, cleaner more obvious way.

Cheers

Mat

*The reason I want the shortcut target is that armed with this information it is possible to programatically schedule my web start app to ..start automatically via the Windows task scheduler (via at or schtasks command). I can schedule the web start app manually at the moment in this way, but ideally would like the web start app to schedule itself.
13 years ago
If there is no JRE at all then you will need to create a script to check what version (if any) of java is installed.

These scripts have already been written - so just create a web page that calls the script and get that to point to your jnlp file.


http://download.oracle.com/javase/6/docs/technotes/guides/jweb/deployment_advice.html#deployingApplications
13 years ago