Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Specifying the search-order of libraries

Help
fftmc1
2007-05-24
2013-05-23
  • fftmc1
    fftmc1
    2007-05-24

    Hi,

    Is it possible to explicitely influence the order in which the one-jar-class-loader
    looks through the JAR files located in the lib directory? Is this possible with the "Class-Path"-attribute in the Manifest-File, e.g.
    "Class-Path: lib/myLibrary.jar lib/myOtherLibrary.jar"?

    Best Regards,
    Tom

     
    • P. Simon Tuffs
      P. Simon Tuffs
      2007-05-27

      Hi Tom:

      As far as I know the entries in the lib directory are iterated in the order that they are placed into the one-jar file by whatever jar task you are using.  Control that, and you will control the search order.  One-Jar does not read the Class-Path entry: this is used by the top-level application classloader to pre-load the classpath with files external to the one-jar file.

      Hope this helps.

      Simon.