How to redirect console view output to a text file in Eclipse?
Go to Run --> Run Configurations..
In the dialog, select your Java project, then select the Common tab.
First, you have to select the Output File Checkbox. Then set the path and filename where Eclipse is going to redirect the console output.
Second, select Append Checkbox.
Run -> Run Configurations... -> Java Application -> Your Application -> Common tab -> File
Check Append for append mode.