• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to run dos command throught JAVA

 
ramesh gosala
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi am Ramesh....

How to run the DOS command like(DIR, CLR, XCOPY)through Java Program,
pls send me sample code for me
Class RunDos_Command{

}
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This has nothing to do with SCJP. Try Runtime.exec()
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the ranch!

After many tries I've given up on ever explaining this better than When Runtime Exec Wont. About all I'd add is that Java 5 introduced ProcessBuilder which is easier to use than runtime.exec().
[ October 01, 2006: Message edited by: Stan James ]
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic