In one of my computers, there is JRE 1.8.0_45 and in another machine there is OpenJDK.
I want to set the JVM flag Dlog4j2.formatMsgNoLookups=true, but where can I write this piece of configuration?
If possible, upgrade to Log4j version 2.15.0.
If upgrading is not possible, then ensure the -Dlog4j2.formatMsgNoLookups=true system property is set. Use the this command:
java -Dlog4j2.formatMsgNoLookups=true -jar myapp.jar
Also worth reading on mitigation:
© 2022 - 2024 — McMap. All rights reserved.
java
command line. There is no single place to put that that will fix all of the commands that use Java. – Colous1.8.0_45
?? That is many, many security patches behind. Fix that too.) – Colous-Dlog4j2.formatMsgNoLookups=true
to the environment variableJAVA_TOOL_OPTIONS
. – AlricJAVA_TOOL_OPTIONS
... – Colous