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.
19
-
* This is because the Apple `JavaApplicationStub` only works for Apple's Java and their `Info.plist` style to store Java properties.
20
-
* To support Oracle Java 7 you would need to built a separate App package with Oracles [ANT task "Appbundler"](https://java.net/projects/appbundler).
21
-
* Thus you would need the user to know which Java distribution he has installed on his Mac. Not very user friendly...
20
+
* This is because the Apple `JavaApplicationStub` only works for Apple's Java and their `Info.plist` style to store Java properties.
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
+
* Thus you would need the user to know which Java distribution he has installed on his Mac. Not very user friendly...
22
23
23
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...
24
25
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:
27
+
* Apple seems to declare the `Java` dictionary as *deprecated* and requires the old Apple Java 6 to be installed. Otherwise the app doesn't open.
28
+
* If Java 7/8 is installed, Apple doesn't accept those java versions as suitable
29
+
* Apple prompts for JRE 6 download even before the `JavaApplicationStub` is executed. This is why we can't intercept at this level and need to replace the `Java` dictionary by a `JavaX` dictionary.
30
+
* This requires the use of my JarBundler fork (see below for more details)
31
+
25
32
*So why, oh why, couldn't Oracle just use the old style of storing Java properties in `Info.plist` and offer a universal JavaApplicationStub?!*:rage:
26
33
27
34
Well, since I can't write such a script in C, C# or whatever fancy language, I wrote it as a shell script. And it works! ;-)
@@ -71,12 +78,14 @@ What you need to do
71
78
-------------------
72
79
73
80
Use whichever ANT task you like:
74
-
* the great opensource ["Jarbundler"](http://informagen.com/JarBundler/)
75
-
* my JarBundler [fork on github](https://github.com/tofi86/Jarbundler) which supports *MixedLocalization*
81
+
* the opensource ["Jarbundler"](http://informagen.com/JarBundler/)*(not recommended anymore)*
82
+
* my JarBundler [fork on github](https://github.com/tofi86/Jarbundler) which supports the newly introduced `JavaX` key *(recommended)*
* or [*infinitekind*'s fork](https://bitbucket.org/infinitekind/appbundler/overview)
78
85
79
-
### JarBundler example
86
+
### Original JarBundler (v2.3) example
87
+
*Might lead to compatibility issues. See below for details...*
88
+
80
89
Just place the `universalJavaApplicationStub` from this repo in your build resources folder and link it in your ANT task (attribute `stubfile`):
81
90
```XML
82
91
<jarbundler
@@ -91,8 +100,32 @@ Just place the `universalJavaApplicationStub` from this repo in your build resou
91
100
92
101
The ANT task will care about the rest...
93
102
94
-
You should get a fully functional Mac Application Bundle working with both Java distributions from Apple and Oracle.
103
+
You should get a functional Mac Application Bundle working with both Java distributions from Apple and Oracle **but with possible incompatibilities to Mac OS X 10.10:**
104
+
105
+
:exclamation:**Attention:**
106
+
> Using the "old" JarBundler <= v2.3 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)*
107
+
>
108
+
> If you don't want to care about compatibility issues between OS X and Java versions, better use my JarBundler fork (see next example).
109
+
110
+
### My JarBundler fork (v2.4) example
111
+
Download the latest release of my JarBundler fork [from it's github repo](https://github.com/tofi86/Jarbundler) and replace your old JarBundler library with the new one.
112
+
113
+
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:
You should get a fully functional Mac Application Bundle working with both Java distributions from Apple and Oracle and all Mac OS X versions.
96
129
97
130
### Appbundler example
98
131
Just place the `universalJavaApplicationStub` from this repo in your build resources folder and link it in your ANT task (attribute `executableName` from [*infinitekind*'s fork](https://bitbucket.org/infinitekind/appbundler/overview)):
@@ -110,7 +143,7 @@ Just place the `universalJavaApplicationStub` from this repo in your build resou
110
143
111
144
The ANT task will care about the rest...
112
145
113
-
You should get a fully functional Mac Application Bundle working with both Java distributions from Apple and Oracle.
146
+
You should get a fully functional Mac Application Bundle working with both Java distributions from Apple and Oracle and all Mac OS X versions.
0 commit comments