Include Java project as library

后端 未结 9 1897
眼角桃花
眼角桃花 2021-02-10 13:48

I have three projects in my eclipse workspace:

EventKitchenCore
EventKitchenDesktop
EventKitchenAndroid

EventKitchenCore contains

9条回答
  •  [愿得一人]
    2021-02-10 14:34

    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.

提交回复
热议问题