I want to know is it possible to use a Single jar file which contains classes that uses other jar that helps for DB connection, logging. And the other jar should be in the same single jar. Or there might be a way if i extract all the jar into a single directory and append all the manifest info of all jars into single manifest file.
First i would explore the possibilities of manifest file then i would post weather I got it worked
Joined: Jul 18, 2007
This is what i found useful:
Note : The Class-Path header points to classes or JAR files on the local network, not JAR files within the JAR file or classes accessible over internet protocols. To load classes in JAR files within a JAR file into the class path, you must write custom code to load those classes. For example, if MyJar.jar contains another JAR file called MyUtils.jar, you cannot use the Class-Path header in MyJar.jar's manifest to load classes in MyUtils.jar into the class path.
What custom code i have to write ??
Joined: Mar 22, 2005
You'd need to write a ClassLoader implementation that knows how load classes from jar files inside of jar files. That's not rocket science, but not for the faint of heart (or beginners) either.
Start by using multiple jar files that are referenced from a single manifest, and see if that works for you.