I have an application that I've developed. Currently it is deployed with all its config files (including log4j.properties
, as used by some external libs I use) in the same dir as my application.
So, I have a bin
dir, containing my app.jar
, plus a few properties files, plus a lib
dir with all my external jars. The external jars are specified in a classpath specified in the app.jar
's manifest file.
Now the powers that be have decreed that the new structure will be a bin
dir with just the app.jar
, with a lib
dir at the same level (i.e. ../lib
, relative to bin
) for external jars and a ../etc
directory for configuration files.
Easy enough, I thought -- I changed all the classpath paths from ./lib/<jarname>
to ../lib/<jarname>
, and added ../etc
to the classpath as well.
Problem is that now any jars that use log4j don't work -- they don't see the log4j.properties
file -- because, I suspect, the classpath for app.jar
doesn't affect the classpath for the external jars (maybe?), and previously they were finding it simply because it was in '.'.
Any thoughts?