HAL9000
HAL9000

Reputation: 3761

eclipse: rebuild a project and all libraries

I'm creating a Java project which includes a few libraries written by myself. However these libraries are not finished and sometimes require some edits. Because I'm working by myself, I find this more efficient than finishing all libraries perfectly before using them in my project.

My question is: is it possible to automatically rebuild a modified library when building the project which uses it?

Subquestion: what is the optimal configuration for my purposes? Should I export libraries as jar and copy them into the final project or should I configure buildpaths of my project to retrieve them in their respective folders?

Subsubquestion: is it correct to use .jar libraries in the same way that one uses dynamic libraries in c++?

Upvotes: 1

Views: 8135

Answers (1)

If you have Eclipse set to "build automatically", it'll take care of rebuilding the library projects whenever you make changes, as you go along. You should set your client program to depend on either the Eclipse projects (if doing everything inside Eclipse) or the Maven artifacts (if using m2e). I strongly prefer using Maven for all my Java builds, but it might be overkill for something small. Whatever you do, don't manually export and reimport the libraries.

All libraries in Java are dynamic, and a C++ .so or .dll is the basic equivalent.

Upvotes: 2

Related Questions