It's not a secret anymore!*
The moose likes JNLP and Web Start and the fly likes Prevent  shortcut creation with Java Web Start Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JNLP and Web Start
Bookmark "Prevent  shortcut creation with Java Web Start" Watch "Prevent  shortcut creation with Java Web Start" New topic
Author

Prevent shortcut creation with Java Web Start

Jonathan Moore
Ranch Hand

Joined: Nov 02, 2005
Posts: 36
Hi,

We have an application that we are deploying to multiple sites around the world. Currently the app is installed manually on a file share in each site and users have a desktop link to it - a far from ideal solution. We want to swicth to using web start but the issue we have is that users do not have administrator rights to their PCs and many only have old versions of Java installed. We cannot therefore rely on Java Web Start to download the correct Java version.

We have come up with a solution where each site run a one off installation that installs the correct version of java on a central file share together with a startup script which will run javaws from that install, pointing to the correct jnlp file. Users will have a shortcut on their desktop to the script. This is actually similar to what happens at the moment except the shortcut runs the Java app directly off the share. What we want to prevent is web start installing its own shortcut as this will potentially cause problems. Is there a way of disabling shortcut creation, either as a command line param for javaws or in the jnlp file?

Alternatively is there a different solution to our problem which would enable us to use web start in a more conventional manner? I know the obvious answer is to upgrade all users to the correct version of Java, but we are talking about ~50 sites worldwide with associated language problems, and we need a solution that will work fairly seemlessly.

Any advice gratefully received.

Thanks
Jon
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

I had a look at the basic JNLP documentation and I see there's a "shortcut" element in the .jnlp file. It doesn't specifically say this, but I assume that if you don't put a "shortcut" element into the file then you won't get any shortcuts created on the client.

Or did you try that already and I assumed wrongly?
Jonathan Moore
Ranch Hand

Joined: Nov 02, 2005
Posts: 36
I did see the shortcut element but couldn't find any decent documentation on it. I don't have it in my current jnlp, but if I have my shortcut creation preference set to "Always allow" it creates the shortcut silently. I don't know who will have Java already installed and what their settings are so I can't seem to guarantee prevention of the shortcut creation.

Thanks
Jon
Jonathan Moore
Ranch Hand

Joined: Nov 02, 2005
Posts: 36
I added an empty shortcut tag and that seemed to do the trick.

Cheers
Jon
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Yes, I wasn't impressed by the level of documentation for that element either. Hopefully your creative solution isn't just a "bug" that gets fixed with the next release!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Prevent shortcut creation with Java Web Start
 
Similar Threads
Using IntegrationService to interrogate the desktop shortcut
How can we allow multiple values of max-heap-size
Do jnlp file updates itself
How to prevent creation of a shortcut on the launch of java webstart?
Launch JNLP within application