Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hello!
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:
cd temp D:\Programs\Java\bin\javac.exe Tester.java > compile_log.txt java Tester > log.txtWhen 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?

Wow! Thank you for the quick (and correct!) reply!
It works like a charm!
But I would really like to know what the "2" stands for.The second "section"? second "echo statement"?
Thanks again,
Daniel

![]() |
![]() |
![]() |
| Login or Register to Reply | |
| Login | Register |
| Ads by Google |