I've been trying to get some config files added into a JAR manifests class-path. Things like Spring, Log4j files etc... when I run the jar, it picks up other jars on the classpath so it can run the application starter class (which is in another jar)开发者_运维技巧 but it only looks for the XML files in the directory the jar is located, even though I can see it's path on the manifest.
Any ideas on how I can fix this?
Try to run it with verbose class loading switch on java command line to make sure classes in jars are actually being loaded.
There is a line length limit of 72 bytes in MANIFEST.MF - make sure you don't have a long lines there.
http://download.oracle.com/javase/1.3/docs/guide/jar/jar.html#Notes%20on%20Manifest%20and%20Signature%20Files
精彩评论