wood burning stoves*
The moose likes Beginning Java and the fly likes Runtime.exec() - command line window problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Runtime.exec() - command line window problem" Watch "Runtime.exec() - command line window problem" New topic

Runtime.exec() - command line window problem

Manikandan Krishnan

Joined: Feb 03, 2003
Posts: 2
Everytime Runtime.exec() runs, a new command line window is appearing in the screen. Acually i am executing dos comment through Runtime.exec() method. I am running JDK 1.3 on W2K. How to eliminate command line window from the screen?
I am invoking my application thro' exe file. By click on the exe file my application will run.
Please find the sample code which i have implemented.
String shareDir = "c:\Mani";
Runtime rt = Runtime.getRuntime();
try {
process = rt.exec("net share mani="+shareDir);
catch (Exception x) {
System.out.println ("Exception " + x);
Mani. kmaniyan@yahoo.com
Marilyn de Queiroz

Joined: Jul 22, 2000
Posts: 9043
Moving to Java in General(beginner)

"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
I agree. Here's the link: http://aspose.com/file-tools
subject: Runtime.exec() - command line window problem
Similar Threads
Apache Monitor for starting a service but the Services window does not
Runtime.exec() hell. Any opinions? explanations?
Program for Virus Checking
Exe Generator software does not get the updated jar but gets the old jar
createProcess error=193, %1 is not a valid win 32 application