Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Any way to have Java Web Start automatically install shortcuts?

We're deploying a Web Start app that I and the other developers know how to install the shortcuts for (Control Panel -> Java on Windows, /Applications/Utilities/Java Preferences on OS X), but we have no reason to believe that end users know how to do this (or even know that it can be done).

Is there a way to either install the shortcuts automatically on first run, or (much preferably) ask the user if they'd like to install the shortcuts? I've been looking all over but the Sun/Oracle docs all say to go through the Java cache viewer, which I find completely ridiculous to ask of end users.

like image 753
sbook Avatar asked Jul 07 '10 16:07

sbook


2 Answers

The JNLP specification allows for specifying that short cuts are to be created when the JNLP file is run.

Check the <jnlp><information><shortcut> tag.

like image 67
Thorbjørn Ravn Andersen Avatar answered Oct 13 '22 00:10

Thorbjørn Ravn Andersen


The javaws command states:

Usage: javaws [control-options]

control-options include:    
  ....
  -import [import-options] <jnlp-file>  import the application to the cache 


import-options include:                     
  ....
  -shortcut         install shortcuts as if user allowed prompt 

so you could probably do it through an invocation of javaws.

like image 28
aioobe Avatar answered Oct 12 '22 22:10

aioobe