Uff... tried to google but with no result.
Hello everybody. I need to run via cmd.exe the next command from java programm (javascript syntax):
"/c cd c:\prb && Processing.bat c:\prb ext.dat auto"
it means i need to change current directory to c:\prb, write "Processing.bat c:\prb ext.dat auto" and press enter.
My Java code is:
String command = "cmd /c start cmd.exe /K cd c:\\prb Processing.bat c:\\prb prb ext.dat auto";
Process pr = Runtime.getRuntime().exec(command);
pr.waitFor();
but it doesn't work. I suppose that i miss some code between "c:\prb" AND "Processing.bat" in the command line.
Could anybody help me?