Reputation: 3583
I made two projects P1 and P2 in eclipse IDE. P2 depends on P1. I did not create any dependency between P1 and P2. I want to convert P1 to Jar and then make P2 use that Jar.
How do I do this ?
Upvotes: 0
Views: 55
Reputation: 213223
Export your project P1
as Jar
. Right click on project, go to Export, go to Java
, select Jar File
.
And then add that Jar
to the Build Path
of project P2
. Right click on project, go to Build Path, go to Configure Build Path -> Libraries tab. Click Add External JARs button, and add the Jar.
See this blog: - http://www.vogella.com/articles/Eclipse/article.html to learn various features of Eclipse.
Upvotes: 2
Reputation: 106
Project dependency (but no jar dependency) : clight click on your P2 project to gets the properties. Go to Java Build Path, and choose Project, add your P1 project here. It will be added in the classpath of your P2 project.
Upvotes: 0