• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 541
  • Last Modified:

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

Hi:

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

Thanks,
JohnB
0
jxbma
Asked:
jxbma
1 Solution
 
jcott28Commented:
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.
0

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now