I have a Java application that uses -D system properties that I create. I'm having issues getting one of them to be translated correctly.
In my test environment (localhost) on my local computer, I'm running Windows using IntelliJ Idea IDE and I enter the -D system properties through the IDE like so:
-Dproperty={\"prop1\":\"val1\",\"prop2\":\"val2\"}
ps -fwwp [processId]
-Dproperty=prop1:val1
-Dproperty=prop2:val2
-Dproperty=prop3:val3
{"prop1":"val1","prop2":"val2"}
Bash requires the curly braces to be escaped, as in:
-Dproperty=\{\"prop1\":\"val1\",\"prop2\":\"val2\"\}
The other option is to try surrounding the entire string in single quotes. Bash won't do any expansions inside single quotes:
-Dproperty='{"prop1":"val1","prop2":"val2"}'
I don't know which option will be easier to make compatible with your windows environment.