I was able to open a command prompt from my Java program with the following code:
String cmd = "C:\\WINNT\\system32\\cmd.exe /c start";
try {
@SuppressWarnings("unused")
Process ps = Runtime.getRuntime().exec(cmd);
} catch (IOException e) {
e.printStackTrace();
}
The above code opens the command prompt.
If I want to execute some command in this opened command prompt , what I have to do?
ANy help is appreciated.