Eclipse saves the console output directly to a text file __eclipse

Source: Internet
Author: User

When running a Java program, the console output too much, or run multiple Java programs at the same time, the output flash past, you can consider the console output, to output to a text file. Without modifying the Java code and introducing a stream so complex, you can directly let eclipse print the output of the console to a text file, as follows:

In Eclipse, select the target's Java file, right-click, select Run->run configurations->common->standard input and output, and select the file you want to save in file, or a new file (for example: C:\a.txt), as shown in the following illustration:


If the A.txt file does not exist, Eclipse automatically creates the log file to save the output.

This eliminates the difficulty of handling the console output.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.