Creating a Jar (NON executable) with all the dependencies
posted 5 years ago
I have some set of utility java classes. They use commons bean utils and some other third party jar files. I created a jar of my utility classes (This jar is NOT executable as it contains only some utility classes that can be used by others) and added the Class-Path attribute to the manifest file at the time of the Jar file creation. However when another application is trying to use my utility classes jar, it fails with a ClassNotFound as my utility classes failed to find its dependencies.
May be I have missed something here. But below is a generic example of my scenario.
Utility.jar - has some utility classes and has no entry point with a main method
Dependancy1.jar - used in Utility.jar
Dependancy2.jar - used in Dependancy1.jar
Now, how should I create the Utility.jar properly, with all the dependencies.
Appreciate your help and many thanks for your time.