You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to run java -Dfoo="one two three" but I didn't manage to find the right combination of quotes or escapes to make this work
Given:
docker run -e JAVA_MAIN_CLASS=Main -e JAVA_OPTIONS="-Dfoo=one two three" -i -t fabric8/java-alpine-openjdk8-jdk:1.8.0 /deployments/run-java.sh
Actual output:
exec java -Dfoo=one two three -javaagent:/opt/agent-bond/agent-bond.jar=jolokia{{host=0.0.0.0}},jmx_exporter{{9779:/opt/agent-bond/jmx_exporter_config.yml}} -XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:MinHeapFreeRatio=20 -XX:MaxHeapFreeRatio=40 -XX:+ExitOnOutOfMemoryError -cp .:/deployments/* Main
Error: Could not find or load main class two
Expected output:
...
Error: Could not find or load main class Main
I tried to add backslashes and quotes in various combinations, but I never got it right.
I suspect it has something to do with the 'normalize spaces' stuff in java_options of /deployments/run-java.sh
The text was updated successfully, but these errors were encountered:
I should add that spaces should not be normalised too aggressively:
If a user wants to pass -Dfoo="one <multiple spaces> two <multiple spaces> three" then the spaces should not be stripped.
(Had to do this edit this a few times because markdown is aggressively removing spaces. How ironic)
I'm trying to run java -Dfoo="one two three" but I didn't manage to find the right combination of quotes or escapes to make this work
Given:
docker run -e JAVA_MAIN_CLASS=Main -e JAVA_OPTIONS="-Dfoo=one two three" -i -t fabric8/java-alpine-openjdk8-jdk:1.8.0 /deployments/run-java.sh
Actual output:
exec java -Dfoo=one two three -javaagent:/opt/agent-bond/agent-bond.jar=jolokia{{host=0.0.0.0}},jmx_exporter{{9779:/opt/agent-bond/jmx_exporter_config.yml}} -XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:MinHeapFreeRatio=20 -XX:MaxHeapFreeRatio=40 -XX:+ExitOnOutOfMemoryError -cp .:/deployments/* Main
Error: Could not find or load main class two
Expected output:
...
Error: Could not find or load main class Main
I tried to add backslashes and quotes in various combinations, but I never got it right.
I suspect it has something to do with the 'normalize spaces' stuff in java_options of /deployments/run-java.sh
The text was updated successfully, but these errors were encountered: