How to reference a different Java project in Eclipse

Right click on Project1, then click on Properties. In the dialog that comes up, select Java Build Path, and then click on the Projects tab. There, add Project2 to the build path.

If Project1 is a web app, you need to make sure your Deployment Assembly (same Properties UI) has Project2 there as well.

Leave a Comment