I have this bash file:
PROP="-Dprop=foo bar"
java $PROP -jar Foo.jar
So what I want to do is pass the list, separated by spaces, as a system property. But this somehow does not work:
Caused by: java.lang.ClassNotFoundException: bar
So, it seems that bash splits -Dprop=foo baron -Dprop=foo, bar. I tried everything: from double quoting to escaping a space, but nothing works.
source
share