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

Commit 0893c4b

Browse files
committed
Update README.md
1 parent 50558ec commit 0893c4b

1 file changed

Lines changed: 14 additions & 12 deletions

File tree

README.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,34 +40,36 @@ How the script works
4040

4141
You don't need a native `JavaApplicationStub` file anymore. The Shell script needs to be executable – that's all.
4242

43-
The script reads JVM properties from `Info.plist` regardless of whether it's Apple or Oracle flavour and feeds it to a commandline `java` call like the following:
43+
The script reads JVM properties from `Info.plist` regardless of whether it's Apple or Oracle style and feeds them to a commandline `java` call like the following:
4444

4545
```Bash
4646
# execute Java and set
47-
# - classpath
48-
# - dock icon
49-
# - application name
50-
# - JVM options
51-
# - JVM default options
52-
# - main class
53-
# - JVM arguments
54-
exec "$JAVACMD" \
47+
# - classpath
48+
# - splash image
49+
# - dock icon
50+
# - app name
51+
# - JVM options
52+
# - JVM default options
53+
# - main class
54+
# - main arguments
55+
# - passthru arguments
56+
exec "${JAVACMD}" \
5557
-cp "${JVMClassPath}" \
5658
-splash:"${ResourcesFolder}/${JVMSplashFile}" \
5759
-Xdock:icon="${ResourcesFolder}/${CFBundleIconFile}" \
5860
-Xdock:name="${CFBundleName}" \
5961
${JVMOptions:+$JVMOptions }\
6062
${JVMDefaultOptions:+$JVMDefaultOptions }\
6163
${JVMMainClass}\
62-
${JVMArguments:+ $JVMArguments}\
64+
${MainArgs:+ $MainArgs}\
6365
${ArgsPassthru:+ $ArgsPassthru}
6466
```
6567

6668
It sets the classpath, the dock icon, the *AboutMenuName* (in Xdock style) and then every *JVMOptions*, *JVMDefaultOptions* or *JVMArguments* found in the `Info.plist` file.
6769

6870
The WorkingDirectory is either retrieved from Apple's Plist key `Java/WorkingDirectory` or set to the JavaRoot directory within the app bundle.
6971

70-
The name of the *main class* is also retrieved from `Info.plist`. If no *main class* is found, an applescript error dialog is shown and the script exits with *exit code 1*.
72+
The name of the *main class* is also retrieved from `Info.plist`. If no *main class* is found, an AppleScript error dialog is shown and the script exits with *exit code 1*.
7173

7274
There is some *foo* happening to determine which Java versions are installed – here's the list in which order system properties are checked:
7375

@@ -81,7 +83,7 @@ There is some *foo* happening to determine which Java versions are installed –
8183
3. If you require a specific Java version with the Plist key `JVMVersion` the script will try to find a matching JDK or JRE in all of the above locations
8284
* if multiple matching JVM's are found, the script will pick the latest (highest version number)
8385

84-
If none of these could be found or executed the script shows an applescript error dialog saying that Java needs to be installed:
86+
If none of these could be found or executed the script shows an AppleScript error dialog saying that Java needs to be installed:
8587

8688
![Error Dialog No Java Found](/docs/java-error.png?raw=true)
8789

0 commit comments

Comments
 (0)