944,052 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 15146
  • Java RSS
Apr 4th, 2005
0

can I invoke dos commands thru Java?

Expand Post »
in the past i have been able to run dos commands thru C++... for example: system("cls") in C++ used to clear the screen... does anyone know if this can be done in java?
Similar Threads
Reputation Points: 10
Solved Threads: 1
Newbie Poster
higherGround574 is offline Offline
21 posts
since Feb 2005
Apr 4th, 2005
0

Re: can I invoke dos commands thru Java?

Well, since Java doesn't run on DOS but only on 32 bit operating systems you won't be able to execute DOS commands.

You can however (if you insist on loosing platform independence) execute Windows (or Unix) shell commands using the appropriate methods from the Runtime class.
As I in principle don't agree with doing this you'll have to figure out the rest on your own, there's tons of documentation about the pitfalls.
Team Colleague
Reputation Points: 1658
Solved Threads: 331
duckman
jwenting is offline Offline
7,719 posts
since Nov 2004
Apr 4th, 2005
0

Re: can I invoke dos commands thru Java?

thanx for the information... makes sense
Reputation Points: 10
Solved Threads: 1
Newbie Poster
higherGround574 is offline Offline
21 posts
since Feb 2005
Apr 4th, 2005
0

Re: can I invoke dos commands thru Java?

You can download DOS versions such as Koffee I think it's called, but I don't see a point in that, and I doubt it would change much accessibility.
Reputation Points: 113
Solved Threads: 19
Postaholic
server_crash is offline Offline
2,108 posts
since Jun 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: Randomly choosing method
Next Thread in Java Forum Timeline: how to do a basic system pause





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC