Kunal Lakhani wrote:After little bit research i found that, when placing all required jars with the jar created in a separate folder, it works.
Now my Question is that, since the created jar contains the required jars, why , again i need to place the required jars with this application jar? And what is the solution for this?
Here is my manifest file :
Here, the problem is of classpath.
You are having JARs inside a JAR. So, if you give classpath as '.', JVM will search for classes inside the Jar File (But not inside the JARs inside that JAR)..
If A.jar contains A.class and B.jar
and B.jar contains B.class
Then, with classpath set to '.', and running the A.jar, JVM will be able to find A.class, but not B.class which is inside B.jar
I have found the problem for you, and you have to find the Solution. If you sort out this problem, you are done.
Hint: - You need to use Custom Class Loader (JarClassLoader in this case).. There are other ways also..
For more help, you can use
this link.