This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "jar file concept" Watch "jar file concept" New topic
Author

jar file concept

kamalkant rajput
Greenhorn

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
Marshal

Joined: Mar 22, 2005
Posts: 41068
    
  43
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".


Ping & DNS - my free Android networking tools app
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: jar file concept
 
Similar Threads
creating jar file from eclipse
struts application deployment in tomcat server
Intellij - implementation instead of declaration
How to set the classpath through a java program ?
ClassNotFoundException: com.mysql.jdbc.Driver