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

Commit de2de6c

Browse files
authored
Do not expand folder/* classpath
UniversalJavaApplicationStub 2.0.1 expands defaults lib/* path instead of passing it directly to java command line. DavMail relies on your script to replace old binary Java launchers, it works great except for this issue. See https://sourceforge.net/p/davmail/support-requests/300/ for more details. Patch moves variable expansion to all cases except OracleJavaFolder fallback.
1 parent c42686b commit de2de6c

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/universalJavaApplicationStub

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,14 +218,18 @@ else
218218
JVMClassPath_RAW=`/usr/libexec/PlistBuddy -c "print JVMClassPath" "${InfoPlistFile}" 2> /dev/null`
219219
if [[ $JVMClassPath_RAW == *Array* ]] ; then
220220
JVMClassPath=.`/usr/libexec/PlistBuddy -c "print JVMClassPath" "${InfoPlistFile}" 2> /dev/null | grep " " | sed 's/^ */:/g' | tr -d '\n' | xargs`
221+
222+
# expand variables $APP_PACKAGE, $JAVAROOT, $USER_HOME
223+
JVMClassPath=`eval "echo ${JVMClassPath}"`
221224
elif [[ ! -z ${JVMClassPath_RAW} ]] ; then
222225
JVMClassPath=${JVMClassPath_RAW}
226+
227+
# expand variables $APP_PACKAGE, $JAVAROOT, $USER_HOME
228+
JVMClassPath=`eval "echo ${JVMClassPath}"`
223229
else
224230
#default: fallback to OracleJavaFolder
225231
JVMClassPath="${JavaFolder}/*"
226232
fi
227-
# expand variables $APP_PACKAGE, $JAVAROOT, $USER_HOME
228-
JVMClassPath=`eval "echo ${JVMClassPath}"`
229233

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

0 commit comments

Comments
 (0)