Hello,
I am trying to build a jar file as an API for other applications to use. The problem is that when I try to use API.jar it relies on other jars that I've included inside API.jar but it the JVM does not find the dependencies. Here is my build.xml:
This creates a jar file with the following tree:
api------
|
com(where some src classes are)
|
net (some other src classes are)
|
conf(configuration files for com and net classes)
|
lib (where dependencies are placed)
|
Meta-Inf
And when I the main application uses API.jar the following error is thrown:
JVM's won't find the dependencies. The standard classpath architecture for JVM's doesn't include looking inside JARs for other JARs. To do that you have to provide your app with a custom classloader. It's what the webservers do in order to resolve the resources inside the WEB-INF/libs directory, for example.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.