java - Command prompt doesn't open with Runtime.getRuntime().exec -


i've created gui (swing) executes batch file contains command prompt .exe file execution specific parameters. when run batch file manually (by double clicking it), expected. problem is: command prompt window doesn't open show progress, moreover, doesn't start work (only initiated) until exit gui (forking?). when starts work, works somewhere in background , seen in task manager. blank command prompt window opened.

from digging little bit around, i've constructed command gives me same result above:

runtime.getruntime().exec("cmd.exe /c start \"encoding\" cmd.exe /c start md \"" + gui.outputdirfield.gettext() + "\\encoderoutput\" & cd \"" + gui.outputdirfield.gettext() + "\\encoderoutput\" & \"" + gui._batfile + "\" & pause"); 

could please assist?

sorry if sounds stupid..

this way works me:

new thread() { @override public void run() { try {     runtime.getruntime().exec("cmd.exe /c start " + gui._batfile); } catch (ioexception e1) { e1.printstacktrace(); } } }.run(); 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -