I would like to use one of my eclipse projects in another one. Is there a 'smooth' way to do that, without having to export one as a jar file and importing it into another? Especially since I work on both project simultaneously, I would like the latest changes from the imported project to be automatically built and imported into the other one. Is that possible?
Asked
Active
Viewed 1.2k times
2 Answers
13
It is possible. Right click on your project -> Build Path -> Configure Build Path. Switch to the Projects tab and add one. It will work as a library.
P.S. You might also want to check this: Creating a java library with Eclipse

Community
- 1
- 1

Kostya Buts
- 1,567
- 1
- 13
- 14
2
Answer to this question explains how to import your own library in eclipse.
Quoting from the answer.
Just have "Project" reference your "Library", on windows the process is (using menu / tab names)
- Go to: Project -> Properties -> Java Build Path -> Projects
- Client Add...
- Select your "Library" project from the list
- Click Ok
- Click the other Ok Now your done and you can use import for classes in your "Library"

Community
- 1
- 1

Rumesh Eranga Hapuarachchi
- 2,458
- 2
- 25
- 40