Java Runtime.getRuntime(): getting output from executing a command line program
I’m using the runtime to run command prompt commands from my Java program. However, I’m not aware of how I can get the output the command returns. Here is my code: Runtime rt = Runtime.getRuntime(); String[] commands = {“system.exe”, “-send” , argument}; Process proc = rt.exec(commands); I tried doing System.out.println(proc); but that did not return … Read more