Is there a way to set the location of the properties file withough specifying 开发者_运维知识库a JVM param such as -Djava.util.logging.config.file=log.properties ?
Yes. Per the documentation, you can configure the LogManager via the Preferences API.
InputStream inputStream = new FileInputStream("logging.properties");
LogManager.getLogManager().readConfiguration(inputStream);
精彩评论