manifest class-path

Discussion in 'Java' started by Roedy Green, Jun 25, 2009.

  1. Roedy Green

    Roedy Green Guest

    Manifest Class-Path:
    In JDK 1.3+ there is an analogous manifest entry to let you control
    the classpath. It is used to specify optional jars that will be
    downloaded only if needed. Normally you would also place a Jar-index
    of these files in your main jar to help the loader decide which ones
    need to be loaded.

    If you have multiple secondary jars, you must specify them in the
    manifest Class-Path entry of the master jar. It won’t do you any good
    to specify them in the SET CLASSPATH environment parameter or on the
    java.exe -classpath parameter.

    Class-Path: myplace/myjar.jar . myplace/other.jar jardir/

    Note how the elements are separated by space, not semicolon or colon
    as on the command line. The elements are relative URLs, but I have not
    done experiments or found any documentation that describes what they
    are relative too. I presume the main jar. It could be the code base of
    the root jar file. It could be the CWD. If you figure it out, please
    let me know.
    --
    Roedy Green Canadian Mind Products
    http://mindprod.com

    If everyone lived the way people do in Vancouver, we would need three more entire planets to support us.
    ~ Guy Dauncey
     
    Roedy Green, Jun 25, 2009
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.