It's not a secret anymore!
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

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "running dos" Watch "running dos" New topic

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"

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.
I agree. Here's the link:
subject: running dos
It's not a secret anymore!