1313# #
1414# @author Tobias Fischer #
1515# @url https://github.com/tofi86/universalJavaApplicationStub #
16- # @date 2017-09-29 #
16+ # @date 2017-10-28 #
1717# @version 2.1.0 #
1818# #
1919# #
@@ -186,9 +186,9 @@ if [ $exitcode -eq 0 ]; then
186186 fi
187187
188188 # read the JVM Arguments
189- JVMArguments =` /usr/libexec/PlistBuddy -c " print ${JavaKey} :Arguments" " ${InfoPlistFile} " 2> /dev/null | xargs`
189+ MainArgs =` /usr/libexec/PlistBuddy -c " print ${JavaKey} :Arguments" " ${InfoPlistFile} " 2> /dev/null | xargs`
190190 # replace occurences of $APP_ROOT with its content
191- JVMArguments =` eval " echo ${JVMArguments } " `
191+ MainArgs =` eval " echo ${MainArgs } " `
192192
193193 # read the Java version we want to find
194194 JVMVersion=` /usr/libexec/PlistBuddy -c " print ${JavaKey} :JVMVersion" " ${InfoPlistFile} " 2> /dev/null | xargs`
@@ -235,10 +235,10 @@ else
235235 # read the JVM Default Options
236236 JVMDefaultOptions=` /usr/libexec/PlistBuddy -c " print :JVMDefaultOptions" " ${InfoPlistFile} " 2> /dev/null | grep -o " \-.*" | tr -d ' \n' | xargs`
237237
238- # read the JVM Arguments
239- JVMArguments =` /usr/libexec/PlistBuddy -c " print :JVMArguments" " ${InfoPlistFile} " 2> /dev/null | tr -d ' \n' | sed -E ' s/Array \{ *(.*) *\}/\1/g' | sed ' s/ */ /g' | xargs`
238+ # read the Main Arguments from JVMArguments key (see #46 for naming details)
239+ MainArgs =` /usr/libexec/PlistBuddy -c " print :JVMArguments" " ${InfoPlistFile} " 2> /dev/null | tr -d ' \n' | sed -E ' s/Array \{ *(.*) *\}/\1/g' | sed ' s/ */ /g' | xargs`
240240 # replace occurences of $APP_ROOT with its content
241- JVMArguments =` eval " echo ${JVMArguments } " `
241+ MainArgs =` eval " echo ${MainArgs } " `
242242fi
243243
244244
@@ -510,7 +510,8 @@ elif [ -f "${JAVACMD}" ] && [ -x "${JAVACMD}" ] ; then
510510 # - JVM options
511511 # - JVM default options
512512 # - main class
513- # - JVM arguments
513+ # - main arguments
514+ # - passthru arguments
514515 exec " ${JAVACMD} " \
515516 -cp " ${JVMClassPath} " \
516517 -splash:" ${ResourcesFolder} /${JVMSplashFile} " \
@@ -519,7 +520,7 @@ elif [ -f "${JAVACMD}" ] && [ -x "${JAVACMD}" ] ; then
519520 ${JVMOptions: +$JVMOptions } \
520521 ${JVMDefaultOptions: +$JVMDefaultOptions } \
521522 ${JVMMainClass} \
522- ${JVMArguments : + $JVMArguments } \
523+ ${MainArgs : + $MainArgs } \
523524 ${ArgsPassthru: + $ArgsPassthru }
524525
525526
0 commit comments