I'm doing a Java project using Eclipse. Currently by default, it shows the output in the Console. Is there any way to redirect it into a text file?

At least in python, I used to do

python somefile.py >  output.txt

Open Run Configurations window and add a new run configuration or edit an existing one. At the configuration tabs, go to Common tab. There you can specify a file to direct the output.

enter image description here

  • Only works when you run a java application. And actually have a run configuration. What if you need the console output from the build itself.
    – Martin
    Mar 8 '16 at 8:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.