On Sep 14, 2007, at 2:11 PM, Kevan Miller wrote:

I'm not entirely certain how an external CLASSPATH and MANIFEST.MF might interact. I do seem to recall that if you use 'java -jar server.jar', the jre ignores your external CLASSPATH setting and only observes the MANIFEST.MF setting... I hoped that invoking java as 'java <main-class-name>' would avoid this issue, but could easily be mistaken...

That's right, the class path setting in the manifest trumps the external setting. I just encountered this today when I needed to add some jars to the classpath for deploy.sh. I ended up having to add them to deployer.jar!META-INF/MANIFEST.MF.

There was already an entry in the manifest for ext-dir that I tried to use instead of altering the manifest:
Extension-Dirs: lib/ext

But placing jars into $G/lib/ext didn't seem to have any effect. Maybe that manifest entry should instead be:
Extension-Dirs: ../lib/ext
like the other paths to lib that are listed in the manifest?

Best wishes,
Paul

Reply via email to