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: 9001
posted
0
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
subject: Runtime.exec() - command line window problem