log4j needs to find your configuration file in the classpath.

Try this instead (log4j it will look for a file named 'log4j.properties'
on the classpath automatically)

java -classpath $CLASSPATH:/home/ru -Dlog4j.debug=true MyClass


-----Original Message-----
From: Robert Upshall [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 23, 2004 2:18 PM
To: [EMAIL PROTECTED]
Subject: log4j.properties on iSeries/AS400


I cannot get the log4j to find the properties file.  I have put in the
classpath and also set the log4j.configuration property and still
nothing.

Here is the command line:

 > java -Dlog4j.debug=true
-Dlog4j.configuration=/home/ru/log4j.properties MyClass


Here is the output:

log4j: Trying to find [/home/ru/log4j.properties] using context
classloader s
   [EMAIL PROTECTED]
   log4j: Trying to find [/home/ru/log4j.properties] using
sun.misc.Launcher$App
   [EMAIL PROTECTED] class loader.
   log4j: Trying to find [/home/ru/log4j.properties] using
ClassLoader.getSystem
   Resource().
   log4j: Could not find resource: [/home/ru/log4j.properties].
   log4j:WARN No appenders could be found for logger
(com.psasoft.sprint.Switch)
   .
   log4j:WARN Please initialize the log4j system
properly.                                                       



Can somebody please help, I need to get this code ported.

Robert



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to