For windows in bat file for wildfly application I was setting as
set "JAVA_OPTS=%JAVA_OPTS% -Djboss.home=..../x/y/pathToApplication"
My requirement is to set the same in mac in shell script file. Tried several ways from google but couldn't get it work.
So I tried export JAVA_OPTS="-Djboss.home=/Users/.../Documents/...cloud/.../wildfly" - it worked
but when I set another variable export JAVA_OPTS="-Dmyapp.home=/Users/.../Documents/...cloud/.../myapp" - it overrides the first one
Next I tried export JAVA_OPTS="-Djboss.home=/Users/.../Documents/...cloud/.../wildfly" - it worked but has overridden the previous value.
So I tried export JAVA_OPTS="%JAVA_OPTS% -Djboss.home=/Users/.../Documents/../cloud/.../wildfly" export JAVA_OPTS="%JAVA_OPTS% -Dmyapp.home=/Users/.../Documents/cloud/dev/deployments/supervisor"
But then shell script fails and terminates.