-
Notifications
You must be signed in to change notification settings - Fork 98
Description
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