Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I always need to run

java -jar e:\abc.jar --boundHost -all- 

in the command promt.

So I have to Run and type cmd , open the DOS prompt then I type/paste above command and press enter.

Can I make a executable file file on desktop so I can just double click on that file to run the command?

share|improve this question
It's not a DOS prompt and never has been, note. – JdeBP Jul 29 '11 at 14:16

Just write that in a text file then rename the extension to .bat

share|improve this answer
you mean I just need to put this java -jar e:\abc.jar --boundHost -all-1 in a .bat file – metal gear solid Jul 29 '11 at 8:32
True, there is no special command for showing 'cmd' first. Just write your 'code' in new text file & save it with .bat extension. – Adam RichardSon Jul 29 '11 at 8:33
yes, @metalgear – Sathya Jul 29 '11 at 9:11
… or to .CMD. – JdeBP Jul 29 '11 at 14:18
it doesn't work. it just oped dos window once – metal gear solid Oct 11 '12 at 9:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.