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.
Copy file name to clipboardexpand all lines: README.md
+14-31
Original file line number
Diff line number
Diff line change
@@ -26,15 +26,15 @@ Whilst developing some Java apps for Mac OS X I was facing the problem of suppor
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:
27
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
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)
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 key.
30
+
* This requires to use the latest [JarBundler](https://github.com/UltraMixer/JarBundler/) version (see below for more details)
31
31
32
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:
33
33
34
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! ;-)
35
35
36
-
How it works
37
-
------------
36
+
How the script works
37
+
--------------------
38
38
39
39
You don't need a native `JavaApplicationStub` file anymore...
40
40
@@ -65,7 +65,7 @@ The WorkingDirectory is either retrieved from Apple's `Info.plist` key `Java/Wor
65
65
66
66
The name of the *main class* is also retrieved from `Info.plist`. If no *main class* could be found, an applescript error dialog is shown and the script exits with *exit code 1*.
67
67
68
-
Also, there is some *foo* happening to determine which Java version is installed. Here's the list in which order system properties are checked:
68
+
There is some *foo* happening to determine which Java versions are installed – here's the list in which order system properties are checked:
69
69
70
70
1. system variable `$JAVA_HOME`
71
71
2.`/usr/libexec/java_home` symlinks
@@ -78,37 +78,19 @@ What you need to do
78
78
-------------------
79
79
80
80
Use whichever ANT task you like:
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)*
81
+
* the opensource ["JarBundler"](https://github.com/UltraMixer/JarBundler)*(recommended)*
82
+
* or my [JarBundler fork](https://github.com/tofi86/Jarbundler)*(deprecated)*
83
+
*_both support the newly introduced and recommended `JavaX` dict key_
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:**
87
+
### JarBundler (≥ v3.3) example
88
+
Download the latest JarBundler release [from its github repo](https://github.com/UltraMixer/JarBundler).
104
89
105
90
: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)*
91
+
> 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)*
107
92
>
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 its github repo](https://github.com/tofi86/Jarbundler) and replace your old JarBundler library with the new one.
93
+
> 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)
112
94
113
95
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:
114
96
```XML
@@ -127,8 +109,9 @@ The ANT task will care about the rest...
127
109
128
110
You should get a fully functional Mac Application Bundle working with both Java distributions from Apple and Oracle and all Mac OS X versions.
129
111
112
+
130
113
### Appbundler example
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)):
114
+
Just place the `universalJavaApplicationStub` from this repo in your build resources folder and link it in your ANT task (attribute `executableName` from [*infinitekind* fork](https://bitbucket.org/infinitekind/appbundler/overview)):
0 commit comments