We help IT Professionals succeed at work.

Putting an icon on desktop to signal a java program?

wes2405
wes2405 asked
on
Medium Priority
251 Views
Last Modified: 2010-03-31
I want to create an icon on the desktop, when it's clicked
an java program will execute...

As easy as it sounds, or isn't it.

I'll award 200 points to a valid answer with a code example...

wes2405@aol.com
wgibbs@polaris.umuc.edu  
Comment
Watch Question

CERTIFIED EXPERT

Commented:
what platform?

On win32, simply make a shortcut, set its icon, and set its "command" to be "java -classpath ... class.name".

and set classpath and classname, and any additional args appropriately.

Commented:
Prepare a .bat(Windows) file or a .sh(Linux) file, and just create a normal desktop shortcut to this file. Inside of it put your code for launching the java application (something like c:\JDK1.3.1\bin\java MainApplicationClass or including the class path too.) You can also make an native executable file which will start your application (this in the case you don't want that the users to see which is your main class for sequrity issues) and point the desktop shortcut to it.

Author

Commented:
I'm awarding you the points...  Thank you...

Know of any websites, etc, that explain this more in depth?
Could you be alittle more specific.

Thank you,

Wes Gibbs

Explore More ContentExplore courses, solutions, and other research materials related to this topic.