1
votes

my classpath defined in the MANIFEST.MF files references to a dir with all the required jars in it, and I would like to add a refference to a jar that is not located inside that directory. This jar should be loaded by the application from the path that was inside the MANIFEST.MF file.

something like this:

Class-Path: lib/something.jar lib/anything.jar lib/m16.jar lib/apache.jar

and the wanted is like this:

Class-Path: lib/something.jar lib/anything.jar lib/m16.jar some/other/path/lib/apache.jar

Thanks for any suggestions,

1
Did you try with absolute paths if that's practicable?adarshr

1 Answers

0
votes

There may be a better way, but one simple option would be to save a copy of your MANIFEST.MF file in your project and then amend the classpath so that it meets your requirements. Then you can specify the specific manifest to use in the <jar> entry of your build file, something like this:

<jar destfile="./bin/MyProject.jar"
    basedir="."
    manifest="./path_to_manifests/MANIFEST.MF"/>