Skip to content
This repository was archived by the owner on Feb 4, 2023. It is now read-only.

Commit 63a85a0

Browse files
committed
Merge branch 'pedrofvteixeira-master'
2 parents 3bbfe8d + 0c042be commit 63a85a0

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/universalJavaApplicationStub

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,18 @@ else
206206
# replace occurences of $APP_ROOT with its content
207207
JVMOptions=`eval "echo ${JVMOptions}"`
208208

209-
JVMClassPath="${JavaFolder}/*"
209+
# read the ClassPath in either Array or String style
210+
JVMClassPath_RAW=`/usr/libexec/PlistBuddy -c "print JVMClassPath" "${InfoPlistFile}" 2> /dev/null`
211+
if [[ $JVMClassPath_RAW == *Array* ]] ; then
212+
JVMClassPath=.`/usr/libexec/PlistBuddy -c "print JVMClassPath" "${InfoPlistFile}" 2> /dev/null | grep " " | sed 's/^ */:/g' | tr -d '\n' | xargs`
213+
elif [[ ! -z ${JVMClassPath_RAW} ]] ; then
214+
JVMClassPath=${JVMClassPath_RAW}
215+
else
216+
#default: fallback to OracleJavaFolder
217+
JVMClassPath="${JavaFolder}/*"
218+
fi
219+
# expand variables $APP_PACKAGE, $JAVAROOT, $USER_HOME
220+
JVMClassPath=`eval "echo ${JVMClassPath}"`
210221

211222
# read the JVM Default Options
212223
JVMDefaultOptions=`/usr/libexec/PlistBuddy -c "print :JVMDefaultOptions" "${InfoPlistFile}" 2> /dev/null | grep -o "\-.*" | tr -d '\n' | xargs`

0 commit comments

Comments
 (0)