I’m using this code to launch a .cmd file:
try { String line; Process p = Runtime.getRuntime().exec(myPath + '\\punchRender.cmd'); BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream())); while ((line = input.readLine()) != null) { System.out.println(line); } input.close(); } catch (Exception err) { err.printStackTrace(); }
It works fine, but I want to actually see the cmd.exe window running. How can I make it show? Any help would be greatly appreciated!
Instead of running your path, try actually running
cmd.exebut using the build instartcommand to launch a new command window. You can see the full set of command line arguments by entering the following at a command prompt:in your case, you probably want to execute something like the command: