Hi, I'm trying to run an executable from my program. I can get the executable to run, but I don't know how to get the information from the executable into a file. If you run an executable from the command windown you can type:
C:\myExecutable.exe args > info.txt
and all the information that would be printed on the screen goes into the file. Is there anyway to do this when you run it from java code? my code is the following:
Runtime r = java.lang.Runtime.getRuntime();
Process p = r.exec(path + myExecutable.exe + " > info.txt"
;
this doesn't work any ideas how I can do it?
thanks
~tictac~
C:\myExecutable.exe args > info.txt
and all the information that would be printed on the screen goes into the file. Is there anyway to do this when you run it from java code? my code is the following:
Runtime r = java.lang.Runtime.getRuntime();
Process p = r.exec(path + myExecutable.exe + " > info.txt"
this doesn't work any ideas how I can do it?
thanks
~tictac~