File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

dos commands through java application

 
ved gunjan
Ranch Hand
Posts: 86
  • 0
  • 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
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
java_gunjan,
Welcome to JavaRanch!
We ain't got many rules 'round these parts, but we do got one. Please change your display name to comply with The JavaRanch Naming Policy.
Thanks Pardner! Hope to see you 'round the Ranch!
 
Sadanand Murthy
Ranch Hand
Posts: 382
  • 0
  • 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

Look at the Runtime class. It has the exec method that will do what you are looking for. However you have to be very careful about it. Read this article before you attempt this.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic