I have three projects in my eclipse workspace:
EventKitchenCore
EventKitchenDesktop
EventKitchenAndroid
EventKitchenCore
contains
The simplest idea (which would work outside of Eclipse, too) would be to create a symlink/shortcut from your package-directory of the library into the src
-folder of your projects:
|- EventKitchenCore
|- src/
|- org.your.library.package <-+
|- EventKitchenDesktop |
|- src/ |
|- org/desktop/something/ |
|- symlink to ----------------+
|- EventKitchenAndroid |
|- src/ |
|- org/android/something/ |
|- symlink to ----------------+
This way, you could compile the actual projects as if your library would be a part of the applications and you have your changes immediately reflected in both your projects.
I believe what you are looking for is the "Link Source" option within Eclipse. From your android project, select the project and right-click to select "Build Path" > "Link Source". This will allow you to have your Java library accessible within the same build path as your android app for development.
Here is a solution that may help you :
1) Eclipse-Package Explorer - Your Project(Android) - Rightclick on your project.
2) Click on Android (At left side of screen) - Now your screen may look like this -
Now at bottom of screen, in Library section you can add all the library project directly without making any JAR. Just you need to import those library projects in workspace or all your library project should be opened in eclipse.
1) Click on Add button you will get the list of library projects available, choose from them and Build your project.
Good Luck..