DIGIT-ARC read-only archive · snapshot: July 23, 2026

In Windows XP making a shorcut to java jar file

4 posts · originally from https://geek.digit.in/community/threads/in-windows-xp-making-a-shorcut-to-java-jar-file.108667/

R
ravi.xolve Original post #1
Feb 14, 2009 at 12:19 AM
I have got a jar file. I want to make a shortcut for it so that the jar is executed by the command:

"java -jar <jarfile>"

on clicking the shortcut. I tried creating the new shortcut in explorer and typing the above command, it didn't work.
G
Feb 14, 2009 at 1:54 AM
Create a batch file like:
java -jar filename.jar %*
R
Feb 14, 2009 at 5:40 PM
This would leave a command line window active while the application is running in another window.
dheeraj_kumar
Feb 17, 2009 at 9:50 PM
the right syntax is:

"c:\<path of java.exe>\java.exe" -jar <entire path of jarfile>

and in the start in box, put the entire path of the jar file within quotes, without the filename.