File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes jar file concept Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "jar file concept" Watch "jar file concept" New topic

jar file concept

kamalkant rajput

Joined: Nov 26, 2007
Posts: 22
hi ,
I wanted to know that is their any option without using any other software so that I can put more than one jar file in a file and make that file as jar and if I set classpath till this jar file than all jar files inside this jar file
should work normally as if path is set for individual jar file.

thanks in advance
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
No, jar files inside of other jar files are not part of the classpath.

You can keep several jar files in the same directory, and refer to them from the manifest of the main jar file, though. That way you have only a single jar file to put into your classpath. See this for details, especially the section title "Adding Classes to the JAR File's Classpath".
I agree. Here's the link:
subject: jar file concept
jQuery in Action, 3rd edition