Skip to content

Commit 7f13b56

Browse files
committed
U relocate jar property read from info.plist
1 parent 2f9d527 commit 7f13b56

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

src/universalJavaApplicationStub

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ plist_get(){
121121
/usr/libexec/PlistBuddy -c "print $1" "${InfoPlistFile}" 2> /dev/null
122122
}
123123

124+
124125
# function 'plist_get_java()'
125126
#
126127
# read a specific Plist key with 'PlistBuddy' utility
@@ -133,8 +134,6 @@ plist_get_java(){
133134
plist_get ${JavaKey:-":Java"}$1
134135
}
135136

136-
137-
138137
# read Info.plist and extract JVM options
139138
############################################
140139

@@ -166,6 +165,12 @@ if [ $exitcode -eq 0 ]; then
166165
JavaFolder="${AppleJavaFolder}"
167166
ResourcesFolder="${AppleResourcesFolder}"
168167

168+
# fix: relocate jar
169+
RelocateJar="$(plist_get_java ':RelocateJar' | xargs)"
170+
if [[ "$RelocateJar" == *true* ]]; then
171+
JavaFolder=${ResourcesFolder}
172+
fi
173+
169174
# set expandable variables
170175
APP_ROOT="${AppPackageFolder}"
171176
APP_PACKAGE="${AppPackageFolder}"
@@ -314,9 +319,6 @@ else
314319

315320
fi
316321

317-
# read JVM options from file
318-
[ -f $JVMOptionsFile ] && while read -r option; do JVMDefaultOptions+=" $option"; done <<< $(sed "/^#.*$/d" $JVMOptionsFile)
319-
320322
# (#75) check for undefined icons or icon names without .icns extension and prepare
321323
# an osascript statement for those cases when the icon can be shown in the dialog
322324
DialogWithIcon=""
@@ -879,9 +881,12 @@ fi
879881
cd "${WorkingDirectory}" || exit 13
880882
stub_logger "[WorkingDirectory] ${WorkingDirectory}"
881883

882-
# invoke bootstrap script
884+
# fix: invoke bootstrap script
883885
[ -x "$BootstrapScript" ] && "$BootstrapScript"
884886

887+
# fix: read JVM options from file
888+
[ -f $JVMOptionsFile ] && while read -r option; do JVMDefaultOptions+=" $option"; done <<< $(sed "/^#.*$/d" $JVMOptionsFile)
889+
885890
# execute Java and set
886891
# - classpath
887892
# - splash image

0 commit comments

Comments
 (0)