You can do this through META-INF/MANIFEST.MF . You can add other banks to the classpath as follows:
Manifest-Version: 1.0 Main-Class: org.domain.MyMainClass Class-Path: lib/slf4j-log4j12-1.5.8.jar lib/slf4j-api-1.5.8.jar
I believe that it only works if you define a Main-Class and start your application as follows:
java -jar my-app.jar
Also note that pathpaths refer to the main bank. Therefore, in my example, the directory structure should look like this:
- my-app.jar
- Lib
- slf4j-log4j12-1.5.8.jar
- SLF4J-api-1.5.8.jar
source share