How can we include a jar file to a jar file ?

In my project iam using some jar files.I created a jar file of my project and included the supporting jar files also.But iam getting an exception class not found even i included the supporting jar files.
[224 byte] By [Kavarthapu.Madana] at [2007-10-2 4:59:32]
# 1

> In my project iam using some jar files.

> I created a jar file of my project and included the

> supporting jar files also.

> But iam getting an exception class not found even i

> included the supporting jar files.

Do you mean you put jar files inside a jar file? If that is what you mean, Java does not directly support jars inside jars. In theory, you could write your own classloader and find jars inside jars.

atmguya at 2007-7-16 1:03:35 > top of Java-index,Desktop,Deploying...
# 2
You can use the ant task <zipfileset src="lib/extra.jar"/>This will expand the extra.jar and include the files in you new jar...
jensemanda at 2007-7-16 1:03:35 > top of Java-index,Desktop,Deploying...
# 3
Do not put the jar inside jar, but keep the inner jar at the same level of main jar and just put CLASSPATH in the manifest of main jar.
pkumarpuria at 2007-7-16 1:03:35 > top of Java-index,Desktop,Deploying...
# 4

Hi, I'm working on the same problem and have across a class called JarClassLoader, which can be downloaded from here: http://java.sun.com/docs/books/tutorial/deployment/jar/ex5/JarClassLoader.java. It's supposed to be able to load classes from within JAR files. I haven't tried it yet, but I seems to me that it could help you out.

Alexander-Raascha at 2007-7-16 1:03:35 > top of Java-index,Desktop,Deploying...