A web project references the configuration of multiple Java projects in eclipse.

Source: Internet
Author: User

 Project Structure:

A project consists of one web project and multiple Java projects. A web project must reference classes and jar packages of other Java projects. During Development with eclipse3.5 and tomcat debugging, the referenced Java project class and jar package cannot be found. After some exploration, I finally made the call. The following describes the debugging methods.

1. Configure projects in Java build path of the web Project

Find the projects view of the Java build path of the web project, click the Add button on the right, and select the Java project to be added. The result is as follows:

 

2. Configure libraries in Java build path of the web Project

Find the libraries view of Java build path of the web project, click the add class folder button on the right, find the relevant Java project, and check the check box before bin,

The configuration result is as follows:

 

3. Configure the Java EE module dependencies of the WEB Project

Right-click the project name of the web project and select Properties. the Java EE module dependencies can be found on the left.

After entering the configuration page, you will see the libraries configured in the previous step. Select the check box. The result is as follows:

Because the jar package under the Java project lib directory needs to be used during debugging, You need to export it. Click Add jars in the lower-right corner, select the jar package under the relevant Java project lib directory, and click OK.

Follow the normal deployment instructions to release the product!

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.