File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Java " Watch "Java " New topic
Author

Java

Dinesh Bhogle
Greenhorn

Joined: Mar 12, 2001
Posts: 6
How to execute OS command through java for example
I want to run cls command through java
Ajith Kallambella
Sheriff

Joined: Mar 17, 2000
Posts: 5782
I am moving this discussion to Java in General(intermediate) forum.

Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
For windows you can use this:
Runtime.getRuntime().exec("cmd /K start run.bat");


"JavaRanch, where the deer and the Certified play" - David O'Meara
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
Also it's worthwhile to check out this article for more info.


"I'm not back." - Bill Harding, Twister
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java