Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How can I store the errors from the javac compiler in a DOS file?

compiler dos errors file javac store
0
Posted

How can I store the errors from the javac compiler in a DOS file?

0

Ans : javac foo.java > errorfile doesn’t work. javac writes errors to stderr, The problem is that DOS doesn’t allow stderr to be redirected (as command.com is very poor software). So you have to use a special error redirection mechanism in the compiler: javac -J-D javac.pipe.output=true myfile.java > errors.txt In JDK 1.2, you can use: javac -Xstdout You typically use this when a compilation produces a lot of error messages, and they scroll off the DOS window before you can read them. Alternatively, you can get a scollbar to appear on a DOS window by changing the properties with the “Layout” tab. Change the Screen Buffer Size Height: to some multiple > 1 of the Window Size Height. E.g. use a buffer height of 100 and screen height of 25 (the default). This will give you three buffers of scroll “history.” The DOS limitation is improved in NT, where you can write javac myfile.java 2> errors.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.