At 10:11 AM 1/31/2001 -0800, Merwyn Welcome wrote:
>Hello all:
>
>IHAC that is running Windows/98 who would like to redirect the error messages
>generated by javac. He tries using:
>
>         javac myprog.java > error.txt
>
>but that just creates an empty file called error.txt. Has anyone encountered
>and solved this problem before?

javac's compiler error messages go to stderr, not stdout.  The correct
incantation would be:

   javac myprog.java 2> error.txt

Just in case your "C" :-) asks, javac also sets the errorlevel in
Win98 to 0 if no errors occurred, 1 otherwise.  So you can do stuff
like this in a batch file:

   javac myprog.java 2> error.txt
   if errorlevel 1 edit error.txt

Hope this helps.


_______________________________________________
Swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/swing

Reply via email to