I am trying to run a jar with the log4j.xml file on the file system outside the jar like so:
java -jar MyJarName.jar -cp=/opt/companyName/pathToJar/ log4j.co
"-jar" only uses the classpath inside the executable jar, and -cp is ignored. Adding "." to the classpath in the executable jar should allow log4j.xml to be fount.