tags:

views:

428

answers:

4

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

+1  A: 

You should be able to create shortcut as normal.

After all, installing Java on Windows should by default allow you to run .jar files directly; there should be an association of that extension to java.exe. Alternatively, you can create a batch file to run the jar and then create the shortcut for that file.

RichN
A: 

If Java is properly installed, the JAR extension is assigned to java. That means on commandline you can type

C:> myprogram.jar

And if your jar is properly build that runs the program.

You can copy/paste-link your JAR file to desktop.

PeterMmm
+2  A: 

You need to look around for Java Windows Installers, they have functionality to create desktop shortcuts. Take a look at this article and this one too.

Install4J is my personal favorite

n002213f
A: 

This is a short tutorial for creating shortcuts to existing programs: http://support.microsoft.com/kb/140443

willcodejavaforfood