Java compiler and its cmd output
Java compiler and its cmd output
I cannot send output of JAVAC command in command prompt to a file with javac >f.txt & f.txt
command. It creates only a 0byte file.
javac >f.txt & f.txt
No i am using windows
– SRIVISHNU BHARAT
Jul 2 at 1:03
1 Answer
1
The problem is that javac
writes compilation error messages to standard error rather than standard output. Try this:
javac
$ javac 2>f.txt YourClass.java
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
you're using unix? then javac ... 2> out.txt should do it
– nicksheen
Jul 1 at 2:40