scala -Dprop=value -e "println(System.getProperty(\"prop\"))"
this problem does not appear on Linux or Mac
This pull request https://github.com/scala/scala/pull/1957 based on the 2nd attachment to this bug did not address all the issues. From the pull request discussion:
- While this parses the -D and -J options, they also get passed as arguments to the class that is run in the end (and I expect that trying to fix this would make the other problems much worse)
- Quoted -J options are silently dropped
- Single-quoted -D options are silently dropped
- Double-quoted -D options are either silently dropped or result in an error