Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

dos commands through java application  RSS feed

 
ved gunjan
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi! everybody i'm in fix.my problem is, i want to run DOS commands through my java application.how to do that.any suggestions.
a java evangelist
 
R Jelda
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can do this way,
Runtime.getRuntime().exec(command)
Regards,
Jelda
 
Sadanand Murthy
Ranch Hand
Posts: 382
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by java_gunjan:
hi! everybody i'm in fix.my problem is, i want to run DOS commands through my java application.how to do that.any suggestions.
a java evangelist

Please do not crosspost. This same question was asked in beginner forum and answered by me. I'd not have bothered to respond if I'd known that someone else had already given you the solution (as R. Jelda has in this forum).
Here is a link to that. In my response I've provided a link to an article about runtime exec.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!