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
Author

Runtime.exec() - command line window problem

Manikandan Krishnan
Greenhorn

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?
Note:
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);
process.waitFor();
}
catch (Exception x) {
System.out.println ("Exception " + x);
}
Regards,
Mani. kmaniyan@yahoo.com
Marilyn de Queiroz
Sheriff

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


JavaBeginnersFaq
"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