Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
The moose likes Java in General and the fly likes JAR problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "JAR problem" Watch "JAR problem" New topic

JAR problem

Tushar Madhukar
Ranch Hand

Joined: May 03, 2006
Posts: 36

I have created an app which is bundled in a JAR file. This app depends upon other jars, whose names I have provided in the Class-Path header in the MANIFEST file.

Currently, whenever I have to invoke this app, I have to make sure that the dependant jars are also in the same directory. This is quite irritating as there are lots of such dependant jars.

Is there some way I can mention in my MANIFEST the absolute path of dependant jars? Alternatively, if I can define a variable in MANIFEST which can be set when I invoke the jar (say by a command-line option), I can use it to set the jars location.

Christophe Verré

Joined: Nov 24, 2005
Posts: 14688

This does not help but maybe you should read this :

With this header, the classes in the files servlet.jar, infobus.jar, and acme/beans.jar will serve as extensions for purposes of the applet or application. The URLs in the Class-Path header are given relative to the URL of the JAR file of the applet or application.

[My Blog]
All roads lead to JavaRanch
Have you tried LearnNowOnline?
subject: JAR problem