Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Runtime.exec() - command line window problem

 
Manikandan Krishnan
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9059
12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to Java in General(beginner)
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic