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:

Runtime....

Posted by Mukul on October 25, 2001 at 7:47 AM

> u can use runtime exec()

> String command="cmd.exe /c start iexplore.exe http://www.artima.com/";

> Process p = Runtime.getRuntime().exec(command);

> have fun ;)

> this is the type of questions i mean. the ones "rude and obnoxious" people like me would answer. try asking "pls help me with my assignment. can you please post the codes here? the lecturer wants us to create a java application that has 6 buttons lined up in 3 x 2 matrix, the first button which will open winamp, the second button internet explorer, the third button to hang the system.. blah blah yadda yadda". probably i would be "rude and obnoxious" again ;)


Actually Chin, it is not that simple using Runtime.exec() does not behave like running the commands from command prompt. There is a fair bit of mystery behind Runtime.exec().

Please have a look at this article...

http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html



Replies:

Sponsored Links



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