You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 4, 2023. It is now read-only.
2. Mac Apps built with tools designed for Apple's Java (like Apple's JarBundler or the [ANT task "Jarbundler"](http://informagen.com/JarBundler/)) won't work on Macs with Oracle Java 7 and no Apple Java installed.
20
20
* This is because the Apple `JavaApplicationStub` only works for Apple's Java and their `Info.plist` style to store Java properties.
21
21
* To support Oracle Java 7 you would need to built a separate App package with Oracles [ANT task "Appbundler"](https://java.net/projects/appbundler).
22
22
* Thus you would need the user to know which Java distribution he has installed on his Mac. Not very user friendly...
23
-
23
+
24
24
3. Oracle uses a different syntax to store Java properties in the applications `Info.plist` file. A Java app packaged as a Mac app with Oracles Appbundler also needs a different `JavaApplicationStub` and therefore won't work on systems with Apple's Java...
25
25
26
26
4. Starting with Mac OS X 10.10 *(Yosemite)*, app packages won't open up anymore if they contain the *deprecated* Plist `Java` dictionary. This isn't confirmed by Apple, but [issue #9](https://github.com/tofi86/universalJavaApplicationStub/issues/9) leads to this assumption:
@@ -76,6 +76,7 @@ If none of these could be found or executed, an applescript error dialog is show
76
76
77
77

78
78
79
+
Messages are localized and displayed either in English (Default), French or German. Language contributions are very welcome!
79
80
80
81
What you need to do
81
82
-------------------
@@ -92,7 +93,7 @@ Download the latest JarBundler release [from its github repo](https://github.com
92
93
93
94
:exclamation:**Attention:**
94
95
> Using an older version of JarBundler (e.g. [old JarBundler ≤ v2.3](http://informagen.com/JarBundler/) or [new JarBundler ≤ v3.2](https://github.com/UltraMixer/JarBundler)) might result in [issue #9](https://github.com/tofi86/universalJavaApplicationStub/issues/9)*(Mac OS X 10.10 asking to install deprecated Apple JRE 6 instead of using a newer Java version)*
95
-
>
96
+
>
96
97
> If you don't want to care about compatibility issues between OS X and Java versions, make sure to use the [latest JarBundler version ≥ 3.3](https://github.com/UltraMixer/JarBundler/releases)
97
98
98
99
Then place the `universalJavaApplicationStub` from this repo in your build resources folder and link it in your ANT task (attribute `stubfile`). Don't forget to set the newly introduced `useJavaXKey` option:
@@ -104,7 +105,7 @@ Then place the `universalJavaApplicationStub` from this repo in your build resou
java_version_hr=`echo ${JVMVersion}| sed -E 's/[0-9]\.([0-9+*]+)/\1/g'| sed 's/+/ or later/'| sed 's/*/ (latest update)/'`
367
+
java_version_hr=`echo ${JVMVersion}| sed -E 's/[0-9]\.([0-9+*]+)/\1/g'| sed "s/+/ ${MSG_JAVA_VERSION_OR_LATER}/"| sed "s/*/ ${MSG_JAVA_VERSION_LATEST}/"`
325
368
# display error message with applescript
326
-
osascript -e "tell application \"System Events\" to display dialog \"ERROR launching '${CFBundleName}'\n\nNo suitable Java version found on your system!\nThis program requires Java ${java_version_hr}\nMake sure you install the required Java version.\" with title \"${CFBundleName}\" buttons {\" OK \", \"Visit java.com\"} default button \"Visit java.com\" with icon path to resource \"${CFBundleIconFile}\" in bundle (path to me)" \
369
+
osascript -e "tell application \"System Events\" to display dialog \"${MSG_ERROR_LAUNCHING}\n\n${MSG_NO_SUITABLE_JAVA}${java_version_hr}.\n${MSG_NO_SUITABLE_JAVA_CHECK}\" with title \"${CFBundleName}\" buttons {\" OK \", \"${MSG_VISIT_JAVA_DOT_COM}\"} default button \"${MSG_VISIT_JAVA_DOT_COM}\" with icon path to resource \"${CFBundleIconFile}\" in bundle (path to me)" \
327
370
-e "set response to button returned of the result" \
328
-
-e "if response is \"Visit java.com\" then open location \"http://java.com\""
371
+
-e "if response is \"${MSG_VISIT_JAVA_DOT_COM}\" then open location \"http://java.com\""
329
372
# exit with error
330
373
exit 3
331
374
fi
@@ -356,7 +399,7 @@ fi
356
399
# display error message if MainClassName is empty
357
400
if [ -z${JVMMainClass} ];then
358
401
# display error message with applescript
359
-
osascript -e "tell application \"System Events\" to display dialog \"ERROR launching '${CFBundleName}'!\n\n'MainClass' isn't specified!\nJava application cannot be started!\" with title \"${CFBundleName}\" buttons {\" OK \"} default button 1 with icon path to resource \"${CFBundleIconFile}\" in bundle (path to me)"
402
+
osascript -e "tell application \"System Events\" to display dialog \"${MSG_ERROR_LAUNCHING}\n\n${MSG_MISSING_MAINCLASS}\" with title \"${CFBundleName}\" buttons {\" OK \"} default button 1 with icon path to resource \"${CFBundleIconFile}\" in bundle (path to me)"
osascript -e "tell application \"System Events\" to display dialog \"ERROR launching '${CFBundleName}'!\n\nYou need to have JAVA installed on your Mac!\nVisit java.com for installation instructions...\" with title \"${CFBundleName}\" buttons {\"Later\", \"Visit java.com\"} default button \"Visit java.com\" with icon path to resource \"${CFBundleIconFile}\" in bundle (path to me)" \
438
+
osascript -e "tell application \"System Events\" to display dialog \"${MSG_ERROR_LAUNCHING}\n\n${MSG_INSTALL_JAVA}\" with title \"${CFBundleName}\" buttons {\"${MSG_LATER}\", \"${MSG_VISIT_JAVA_DOT_COM}\"} default button \"${MSG_VISIT_JAVA_DOT_COM}\" with icon path to resource \"${CFBundleIconFile}\" in bundle (path to me)" \
396
439
-e "set response to button returned of the result" \
397
-
-e "if response is \"Visit java.com\" then open location \"http://java.com\""
440
+
-e "if response is \"${MSG_VISIT_JAVA_DOT_COM}\" then open location \"http://java.com\""
0 commit comments