The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
October 2001

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Executing multiple DOS commands in Java

Posted by Ravish Khanna on October 09, 2001 at 10:12 AM

I am trying to execute 2 set of DOS commands using Java. I know that by using for e.g.:

Runtime r = Runtime.getRuntime ();
Process p = r.exec ("cmd /c cls");

I can excute on set of DOS command in Java but i need to set a Classpath before executing the final command. Please let me whether its possible. If yes, what is the mode of it.

Thanks



Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us