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

Commit 27724d4

Browse files
committed
for Oracle: add $APP_ROOT to the list of expandable variables
1 parent 0c157da commit 27724d4

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/universalJavaApplicationStub

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,17 +173,23 @@ else
173173
ResourcesFolder="${OracleResourcesFolder}"
174174
WorkingDirectory="${OracleJavaFolder}"
175175

176+
APP_ROOT="${AppPackageFolder}"
177+
176178
# read the MainClass name
177179
JVMMainClass=`/usr/libexec/PlistBuddy -c "print :JVMMainClassName" "${InfoPlistFile}" 2> /dev/null`
178180

179181
# read the JVM Options
180182
JVMOptions=`/usr/libexec/PlistBuddy -c "print :JVMOptions" "${InfoPlistFile}" 2> /dev/null | grep " -" | tr -d '\n' | sed 's/ */ /g' | xargs`
183+
# replace occurances of $APP_ROOT with it's content
184+
JVMOptions=`eval "echo ${JVMOptions}"`
181185

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

185189
# read the JVM Arguments
186190
JVMArguments=`/usr/libexec/PlistBuddy -c "print :JVMArguments" "${InfoPlistFile}" 2> /dev/null | tr -d '\n' | sed -E 's/Array \{ *(.*) *\}/\1/g' | sed 's/ */ /g' | xargs`
191+
# replace occurances of $APP_ROOT with it's content
192+
JVMArguments=`eval "echo ${JVMArguments}"`
187193

188194
JVMClassPath="${JavaFolder}/*"
189195
fi

0 commit comments

Comments
 (0)