The role of the project option in the build path of the Eclipse project

Phenomenon description, there are project A and project B in eclipse, some classes in project A should be referenced in project B, the general practice before is to export Porject A as a jar, and in project B, import the jar of A . However, if it is in the project development stage, the classes in project A have not been completely written, or some of the methods still have problems and need to be corrected. In this case, after each change to the source code in A, the To make A into a jar, and then import it in B, it can be verified, so the modification of the code will be very troublesome. Is there a way, after the source in A is changed, the result can be directly verified by running the B project directly. This is the role of the project under the build path.

       The add jar function of project in the build path of the project is the same as that of the libraries of the build path. These are two solutions when calling the source of another project in one project. The difference is as mentioned above. Of course, if project A has been completed and there are no bugs, the effect of these two methods is the same.

     Append the project in the build path:

add libreries:




Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326861902&siteId=291194637