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

Commit c5c417c

Browse files
committed
Standard Working Directory for Apple PList obviously is the AppRoot directory
otherwise something like this without a WorkingDir key wouldn’t work: ``` <key>Java</key> <dict> <key>MainClass</key> <string>main.class.name</string> <key>JVMVersion</key> <string>1.6+</string> <key>ClassPath</key> <array> <string>$JAVAROOT/library1.jar</string> <string>lib/library2.jar</string> </array> </dict> ``` where `lib/` dir is relative to APP-package
1 parent 594abe6 commit c5c417c

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

src/universalJavaApplicationStub

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,14 @@ PROGDIR=`dirname "$PRG"`
7373
# set files and folders
7474
############################################
7575

76-
# the base path of the app package
76+
# the absolute path of the app package
7777
cd "$PROGDIR"/../../
7878
AppPackageFolder=`pwd`
7979

80+
# the base path of the app package
81+
cd ..
82+
AppPackageRoot=`pwd`
83+
8084
# set Apple's Java folder
8185
AppleJavaFolder="${AppPackageFolder}"/Contents/Resources/Java
8286

@@ -127,8 +131,8 @@ if [ -d "${AppleJavaFolder}" ]; then
127131
WorkingDirectory="${JVMWorkDir}"
128132

129133
else
130-
# root is the standard WorkingDirectory when the script is started
131-
WorkingDirectory="/"
134+
# AppPackageRoot is the standard WorkingDirectory when the script is started
135+
WorkingDirectory="${AppPackageRoot}"
132136
fi
133137

134138
# set Java and Resources folder

0 commit comments

Comments
 (0)