containers icon indicating copy to clipboard operation
containers copied to clipboard

JDK_JAVA_OPTIONS picked up twice

Open irigarae opened this issue 4 years ago • 2 comments

When using the JDK_JAVA_OPTIONS environment variable it's picked up twice.

$ echo 'public class Test { public static void main(String[] args) { System.out.println("Should pick once"); } }' > Test.java
$ docker run --rm -it -v $(pwd)/Test.java:/Test.java:Z -e JDK_JAVA_OPTIONS="-Dsomehow=duplicated" eclipse-temurin:17.0.1_12-jdk-alpine java Test.java
NOTE: Picked up JDK_JAVA_OPTIONS: -Dsomehow=duplicated
NOTE: Picked up JDK_JAVA_OPTIONS: -Dsomehow=duplicated
Should pick once

Visible also by running an app in the background and doing

$ jps -lvm
6 jdk.compiler/com.sun.tools.javac.launcher.Main Test.java -Dsomehow=duplicated -Dsomehow=duplicated --add-modules=ALL-DEFAULT

Also visible from JMX.

irigarae avatar Jan 31 '22 16:01 irigarae

duplicated as in https://github.com/adoptium/adoptium-support/issues/303 ?

zdtsw avatar Oct 05 '22 15:10 zdtsw