JAR files and manifest: Class-Path

From: Karsten Wutzke (kwutzke-blahblah_at_emporis.com)
Date: 01/06/04


Date: Tue, 06 Jan 2004 17:24:33 +0100

Hi!

I have a base dir, where the application JAR file resides. In this base
dir, there's also a lib dir, nothing special really. In this lib dir are
some user look and feel JAR files, which are supposed to be loaded when
the application is started via the JAR file.

Is there any way to use the Class-Path entry in the manifest, so that it
scans that ./lib directory and loads all the JARs in there, *without
knowing up-front, what these files are*?

I tried

Class-Path: ./lib
Class-Path: ./lib/
Class-Path: ./lib/*
Class-Path: ./lib/*.jar

but none of them work.

Maybe there's some other way, which I don't know of. I simply don't want
to explicitly deploy the JAR's (versions, size etc.).

Anyway, how do I do it?

Karsten



Relevant Pages

  • Re: Starting java with -jar option precludes *.class files on CLASSPATH ?
    ... >What "application classes" are not loaded from the JAR file? ... Sun classes ... classes mentioned in the Jar's Class-Path ... Prev by Date: ...
    (comp.lang.java.programmer)
  • Re: JAR files and manifest: Class-Path
    ... > I have a base dir, where the application JAR file resides. ... > dir, there's also a lib dir, nothing special really. ... Point is: use relative path ...
    (comp.lang.java.programmer)
  • Re: JAR files and manifest: Class-Path
    ... HTH, ... > I have a base dir, where the application JAR file resides. ... > dir, there's also a lib dir, nothing special really. ... > Is there any way to use the Class-Path entry in the manifest, ...
    (comp.lang.java.programmer)
  • Re: jar problems
    ... other user class path settings are ignored." ... the JarMan class because the jarman jar file is being ignored. ... What you need to do is add the Class-Path attribute to the manifest: ...
    (comp.lang.java.help)
  • Re: jar files and CLASSPATH
    ... When you run a jar file, ... I did this by using jar to extract the class files ... > And, yes, I did have a manifest file pointing to the mainroutine. ... Class-Path: ./lib/hsqldb.jar ...
    (comp.lang.java.developer)