I am trying to design a layered application, and I am creating a workspace for each layer.
I first started with the persistence layer. It uses hibernate, and now I want to create a jar file so that the other layers can use it as a dependency.
I placed all the hibernate jars in src/lib, and all source files are under src/java. However, after creating a jar using export->jar file, and adding it to the other project's build path, it cannot find any of the hibernate stuff.
I assume I am not understanding how to use the java build path correctly.
I wouldn't use the jar for the other projects, but let them depend directly on the persistence project. The persistence project can then export the dependencies on hibernate et al.
This way it's easier to test how the projects work together and it enables easy cross-project refactorings, while still making sure that you don't get any undesired code dependencies.
You can still use the different jar files for distribution.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: Question about creating a jar file with eclipse