Detailed description of BuildPath in Eclipse [reprinted], eclipsebuildpath

Source: Internet
Author: User

Detailed description of BuildPath in Eclipse [reprinted], eclipsebuildpath
What is Build Path?

Build Path is a set of resource attributes contained in a Java project.

In a mature Java project, not only do you have Source Code Compiled by yourself, but you also need to reference the system Runtime Library (JRE), third-party Function Extension library, and other projects in the workspace, even external class files, all these resources are dependent on this project, and the project can be compiled successfully only after being referenced, build Path is used to configure and manage references to these resources.

Build Path generally includes:

Why use Build Path?

By using Build Path, you can better manage the resources contained in the Java project and make the project structure clear and reasonable.
On the contrary, as code and functions increase, the engineering structure will become messy and difficult to manage.

Details in Eclipse:

To open the Build Path Management Interface, follow these steps:
Right-click the project and choose Build Path> Configure Build Path.

Projects options:You can add, edit, and remove projects that the current project depends on.

Libraries options:You can add, edit, and remove library files that the current project depends on.
Add JARs: Add the jar file in the current project directory.
Add External JARs: Add a jar file in an External directory other than the current project.
Add Variable: Add Variable.
Add Library: the Library for adding the JRE system.
Add Class Folder: Add the. class file compiled in the current project.
Add External Class Folder: Add a. class file other than the current project.

Order and Export:You can sort the databases added to the current project, or set whether the library files are exported along with the project when exporting the current project.

Note:
1. After the system library version of the project is changed, changing the high version to the lower version will cause problems. Changing the lower version to the higher version will be okay.
Because some packages in the system library of the higher version do not exist in the library of the lower version. Therefore, the system libraries of earlier versions are well adapted.

2. After changing the system library version of the project, if it is a later version, change the JDK compatibility option to the current version. However, there is no problem if the system library of the earlier version is changed to the later version and the JDK compatibility is not changed.
The JDK version used for JDK compatibility is associated with the JRE version we selected when creating a project.
The reason why JDK compatibility does not need to be changed when the system library of the earlier version is changed to the later version is that the later version is compatible with the lower version.

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.