This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Getting MEAN with Mongo, Express, Angular, and Node and have Simon Holmes on-line!
See this thread for details.
The moose likes Java in General and the fly likes running dos Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Java in General
Bookmark "running dos" Watch "running dos" New topic
Author

running dos

Paul Keohan
Ranch Hand

Joined: Mar 15, 2000
Posts: 411
How do I run DOS commands from a Java program?
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
Basically you need to use a variation of:
Runtime.getRuntime().exec("cmd /c start myfile.bat");
Do a search on "Runtime exec start" and you will find lots of discussions about this.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: running dos