When env var DRAGONWELL_JAVA_TOOL_OPTIONS_JDK_ONLY is true, JAVA_TOOL_OPTIONS should only be picked by java command, and not picked by java -version, jstack, jps, etc. https://github.com/alibaba/dragonwell8/issues/330
Steps to Reproduce
sh-4.2# echo $JAVA_TOOL_OPTIONS
-javaagent:/home/admin/.opt/ArmsAgent/arms-bootstrap-1.7.0-SNAPSHOT.jar -Dmse.enable=true ...
sh-4.2# echo $DRAGONWELL_JAVA_TOOL_OPTIONS_JDK_ONLY
true
sh-4.2# java -version #JAVA_TOOL_OPTIONS is not picked
openjdk version "1.8.0_345"
OpenJDK Runtime Environment (Alibaba Dragonwell Extended Edition 8.12.13) (build 1.8.0_345-b01)
OpenJDK 64-Bit Server VM (Alibaba Dragonwell Extended Edition 8.12.13) (build 25.345-b01, mixed mode)
sh-4.2# jstack #JAVA_TOOL_OPTIONS is picked, **that's not expected**
Picked up JAVA_TOOL_OPTIONS: -javaagent:/home/admin/.opt/ArmsAgent/arms-bootstrap-1.7.0-SNAPSHOT.jar -Dmse.enable=true
...
sh-4.2# jps #JAVA_TOOL_OPTIONS is picked, **that's not expected**
Picked up JAVA_TOOL_OPTIONS: -javaagent:/home/admin/.opt/ArmsAgent/arms-bootstrap-1.7.0-SNAPSHOT.jar -Dmse.enable=true
...
Expected behavior
jps, jstack should not picked JAVA_TOOL_OPTIONS, when DRAGONWELL_JAVA_TOOL_OPTIONS_JDK_ONLY is true.
Description
When env var
DRAGONWELL_JAVA_TOOL_OPTIONS_JDK_ONLY
is true,JAVA_TOOL_OPTIONS
should only be picked byjava
command, and not picked byjava -version
,jstack
,jps
, etc. https://github.com/alibaba/dragonwell8/issues/330Steps to Reproduce
Expected behavior
jps
,jstack
should not pickedJAVA_TOOL_OPTIONS
, whenDRAGONWELL_JAVA_TOOL_OPTIONS_JDK_ONLY
is true.There is some JDK tools list:
JDK version
Execution environment