This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes dos commands through java application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "dos commands through java application" Watch "dos commands through java application" New topic
Author

dos commands through java application

ved gunjan
Ranch Hand

Joined: May 17, 2003
Posts: 86
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

Joined: Dec 10, 2001
Posts: 7023
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!


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Sadanand Murthy
Ranch Hand

Joined: Nov 26, 2003
Posts: 382
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.


Ever Existing, Ever Conscious, Ever-new Bliss
 
Don't get me started about those stupid light bulbs.
 
subject: dos commands through java application
 
Similar Threads
DOS command in java program question..
Runtime.exec()
running dos
run dos cammand in java code
dos commands through java application