How do I create a shortcut to run a java jar file in a command window in Windows 7?


I've got a bunch of java files I need to load/run within command windows.
How do I configure a windows command shortcut to do so?
I can create a short cut for the command prompt, but don't know how
to get the rest of the way there.

For example:
java -jar SomeJavaToRun.jar SomeJavaToRun.cfg localhost

jxbmaSoftware ConsultantAsked:
Who is Participating?
jcott28Connect With a Mentor Commented:
Create a batch file to runt he java, then create a shortcut to the batch file.

create : doit.bat

Put your statement in it :
java -jar SomeJavaToRun.jar SomeJavaToRun.cfg localhost

save it, right click on it, and create shortcut.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.