Log4j email error “Cannot find java.home ??”

后端 未结 1 369
抹茶落季
抹茶落季 2021-01-19 10:37

I\'m using log4j under J2SE. I\'ve configured it to use a mailer for a certain type of log event.. When the logger.error triggers I get the following exception:



        
相关标签:
1条回答
  • 2021-01-19 10:53

    I looked at the source code of NetProperties and the error basically means what it says. The System property called "java.home" is unset. According to the javadoc for System.getProperties(), that property is set automatically by the JVM to the java installation directory.

    The only explanation I can think of is that something in your application or some third-party library you are using has explicitly unset that property. That is obviously a bad thing to do ...

    0 讨论(0)
提交回复
热议问题