Set the output path of the. Class file and the setting of "Java build path" in eclipse

Source: Internet
Author: User

1. Set "source folder" and "Output Folder ".

* Source Folder: the root directory for storing. Java source files;
* Output Folder: the root directory of the. Class compilation output;
* In pure "Java Project", "src" is usually set to source folder, and bin is set to Output Folder;
* "WEB Project", generally set "src" to source folder, set the WEB-INF/classes to Output Folder; (the above is the default setting of eclipse)
* "Source" tab in "Java build path": This is used to set "source folder" and "Output Folder". Generally, the above eclipse default settings are used;

* Right-click the project name-> "properties"-> "Java build path"-> "Source"-> "Output Folder", and click "Browser" to select a folder as the root directory, OK!

* When creating a "Java Project", if you click "Next" instead of "finish", set a "source folder" (such as "src ".), Generally, the "Output Folder" is "project name/bin" automatically by default, and the default bin is used as the Output Folder.

* If "src" is not set to source folder in the "Source" tab of "Java build path", the "src" folder is located in. the package of the Java file must be added by the package name. For example:
"Src" is not set to source folder: Package src.com. decisiontree;
"Src" is set to source folder: Package com. decisiontree;

It seems that source folder is the meaning of locating the root directory of the. Java source file. That is to say, it is different from package.

* If you do not set Output Folder, the default output path is: The same folder as the. Java file.

* You can use the "add folder" option to set any folder under the "Project name" as "source folder ";
* You can also use the "link source" option to import any folder as "source folder ";

2. the other tabs in "Java build path", "projects", "Libraries", and "order and export" are not too clear, but they are simply understood and used, to be learned and summarized.

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.