I have a batch file where the content is something like this :
java -jar myJarFile.jar
myJarFile.jar is provided, i cannot change the code inside. What it does is that, once started, it will act as a client and tries to connect to a server somewhere remotely and retrieves data into itself.
Then it will create another client, but this time, it will tries to connect to a server I created myself, and passes those data to me.
Thus, back in my program, I need to create a server, and trigger that batch file.
This is what I did in executing the batch file :
Runtime rc = Runtime.getRuntime();
p = rc.getRuntime().exec("cmd.exe start /c abc.batch");
It works fine. But it shows a dos windows box that I do not want it to show. Thus, I use ".... start /b......".
It manages to trigger the batch file and create a process(I can see it in windows task manager). But it just stays there, with no response, it's not sending me anything this time....
my question is, why by hiding away the windows box, it's not working properly? Is there any different for displaying the windows and not to???
Message was edited by: