Redirect or capture eclipse console output to text file



There are situations where we need to capture or redirect the eclipse console to a text file, so later we can refer to the output.

How to

  • Write a java program as usual in eclipse.
  • While on the program screen, click on Run -> Run Configurations…
  • Navigate to “Common” tab
  • Check “File:” and “Append” box and enter the file path and apply
  • Run the java test as usual, check the file at specified path…

Console content will be captured to the text file.


By using Java program we can achieve the same with below statement,

Find the output.txt file under your C:\ drive.

Content posted is based on learning or working experience, please leave comments if anything needs to be added or updated, discuss your queries on our, Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: