I'm making some program (not in java - in PHP if it matters but its really irrelevant).
I need to compile some java files with javac.exe (and later run them)
To compile it I first copy all necessary files into a folder called "temp" and then compile it.
Example batch code:
D:\Programs\Java\bin\javac.exe Tester.java > compile_log.txt
java Tester > log.txt
When the java code is correct the program creates a file named "compile_log.txt" which is empty, and a file called "log.txt" with all the output from the java program.
(Which is perfect).
Now, when there are java compilation errors, I've expected compile_log.txt to contain all the errors, but its still empty.
How can I output the compilation errors into a file using batch?