banray
banray

Reputation:

JWS JNLP no Desktop Icon on Mac

I seem to be having a problem getting the icon for a Java Web Start program to appear on the Mac desktop, or under "Applications". The icon's and menu's are created and work properly under windows XP and Vista, is there something different that must be done for Macs?

On the Mac there aren't output any errors, it prompts me with the question if I would like to create the shortcuts, I click yes, and then it continues launching the program but never seems to produce them.

Upvotes: 3

Views: 3009

Answers (2)

user1828108
user1828108

Reputation: 447

I posted a slightly separate question on the following page: JNLP icon not showing up on Mac OS X

and was told that it is a duplicate of this question. So once I figured out the problem, I thought it may help someone if I included my solution here as well:

The solution was to use separate <information os=""> tags in the JNLP for each Operating System, which in turn includes separate <icon> tags. I used the OS values of "Linux", "Windows" and "Mac" and in the <icon> tags for each OS, I added an href containing an ico file for Linux and Windows, and an icns file for the Mac. The JNLP for my Java Web Start app now creates desktop shortcuts on all three platforms.

Upvotes: 3

gouessej
gouessej

Reputation: 4075

This is a limitation of the current implementation of Java Web Start, the shortcut feature works reliably only on Windows and Linux (with GNOME window manager only).

There is a workaround for Mac: get the path of the desktop folder (System.getProperty("user.home")+"/Desktop" on Mac OS X, System.getProperty("user.home")+"/Desktop Folder" on older Mac OS versions), use this to create the Alias file: How to create an alias programmatically

and copy this file into the desktop folder.

Upvotes: 1

Related Questions