File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes How to include third party jar files with in manifest file. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "How to include third party jar files with in manifest file." Watch "How to include third party jar files with in manifest file." New topic
Author

How to include third party jar files with in manifest file.

Srinivas Kasani
Greenhorn

Joined: Sep 26, 2008
Posts: 22
I have a requirement, where by I need to create a executable jar file. The application uses third party jar files like log4j.jar etc. One way, I was able to do is extract the class files from third party files and include those classes under the execuatable jar. But that means I need to extract lot of 3rd party jar files. Is there any way, I accomplish creating an executable jar file by including the 3rd party jar files in manifest file.
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 9990
    
    7

You can do it by the Class-Path attribute in the manifest file.
Typically the entry will look like
Class-Path : a.jar lib/b.jar c.jar
The values are relative urls to your jar and must be separated by white space.


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Dmitry Mamonov
Greenhorn

Joined: Dec 24, 2008
Posts: 28
Next utility may help you:
http://one-jar.sourceforge.net/
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to include third party jar files with in manifest file.
 
Similar Threads
POI
Defining batch files with classpath variables
how to make executable jar file with library jar files?
Main Class Not Found in JAR file
How to execute jar file from another directory