File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Java in General
java logging : java.util.logging.config.file - accessing logging.properties in classpath
Joined: Oct 08, 2009
Oct 08, 2009 15:21:54
I have a standalone
application using java logging. I have placed logging.properties in:
I am setting following system property:
Unfortunately, the java logging code is not able to locate this file. On debugging into java.util.logging.LogManager.java, it looks like this line of code may be the cause:
InputStream in = new FileInputStream(fname); Here fname = com/pkg1/pkg2/logging.properties and it cannot find the file.
Where should I place logging.properties and how do I set that location in env variable value?
-Djava.util.logging.config.file = WHAT_TO_PUT_HERE?
This app jar is going to run on unix server.
Appreciate your help,thanks.
Joined: Oct 14, 2005
Oct 08, 2009 15:49:08
Just put the full absolute path of the properties file. Don't use a relative path unless you are sure you can control the current working directory when the application is run, and if you can then make the path relative to that directory.
I agree. Here's the link:
subject: java logging : java.util.logging.config.file - accessing logging.properties in classpath
Java Web Start and JDK Logger
Exam 310-065 first excercise
slf4j logging issue - log file not getting generated
JAVA Package Query
Default package try to access user define package
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014