Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create shortcut icon for java program

Tags:

java

swing

Hi I have created executable jar of my java program i want to create shortcut icon for that jar. Means may be my jar is in any other memory location of hard drive(eg- D or E drive for windows) but my icon must be at Desktop. So that if i double click on icon from desktop then my application will start. How to create this

Thanks Sunil Kumar Sahoo

like image 653
Sunil Kumar Sahoo Avatar asked Sep 30 '09 06:09

Sunil Kumar Sahoo


1 Answers

100% Working native windows shortcut for jar execution:

First create regular windows shortcut (right click on desktop, new -> shortcut)
In text field "Type the location of the item" write:
"C:\path\to\javaw.exe" -jar "C:\path\to\jar\myExecutableJar.jar"

enter image description here

Click next, type shortcut name ant press Finish.

That's all! :)

Then You can set custom icon:

Right click on shortcut -> Properties -> Change Icon...

enter image description here

like image 176
Ricardas Avatar answered Oct 06 '22 01:10

Ricardas