ho-dev / HattrickOrganizer

Assistant for Hattrick online football manager
https://ho-dev.github.io/HattrickOrganizer/
GNU Lesser General Public License v3.0
195 stars 79 forks source link

[eBUG] Can't build OsX .app if Java 11 is the default version #198

Closed pierpaolocira closed 5 years ago

pierpaolocira commented 5 years ago

This happens in case the default JRE on MacOSX is Java 11. To verify run /usr/libexec/java_home and the output should be /Library/Java/JavaVirtualMachines/jdk-11.0.4.jdk/Contents/Home

By building the HO.app with gradle, the application just shows a generic "JRE Error" in the splash screen.

It is not clear if it is related either to the code (not yet compatible with Java 11 (see issue #106 ) or to an issue in the plugin used to build the app (edu.sc.seis.macAppBundle, see crotwell/gradle-macappbundle#56 and crotwell/gradle-macappbundle#49 )... or perhaps both.

The current workaround I use is to change the build.gradle by changing the line bundleJRE = true to bundleJRE = false into macAppBundle {.

As alternative we can set jreHome within the macAppBundle section, but then we will make it dependent by the workstation of the person that compiles it.

I like the idea to embed a JRE (I think it follows the Oracle guidelines related to distributing desktop applications, in order to avoid compatibility issues), but we might disabled the bundle JRE for the time being.

akasolace commented 5 years ago

@pierpaolocira I did not even know it was bundled (shame) :-) if you put it equals to False does it work ?

pierpaolocira commented 5 years ago

@akasolace

@pierpaolocira I did not even know it was bundled (shame) :-)

:)

if you put it equals to False does it work ?

Yes... but I imagine it works because a JRE is available on my workstation.

I currently use (as a stable version for my Hattrick team) the 1.437 downloaded from here (already built by you) and it works fine... but I just verified and it doesn't seem to bundle a JRE.

So, we have just to make sure that MacOSX users manually install a compatible JRE in order to use HO (as it seems to be for previous versions).

I would suggest to remove the JRE bundling (for the time being) and then open another "feature request" for the future, so that when the macAppBundle solve the issue (by allowing to define a specific version, or to successfully embed a JRE11) we can reintroduce this feature in our build (I'm quite sure I read some Oracle recommendation about the practice to embed a JRE in the binary).

What do you think?

akasolace commented 5 years ago

I do not recall having made change to that part of the code since 1.437 Yes I think we should set bundle jre=False. I am not even sure it is a good idea to have this as a feature request but you can still create it and we can think about it down the road.

pierpaolocira commented 5 years ago

@akasolace I think that Mac (spoiled :) ) users would love to just drag'n'drop the .app and use it without be worried about JRE... and it complies with Oracle guidelines.

Anyway let's put it to false for the time being.

You can assign to me, and I'll change and test when I resolve #166

akasolace commented 5 years ago

@pierpaolocira ok so lets create a ticket for this to be done down the road ... maybe after we upgrade to java 11

pierpaolocira commented 5 years ago

I thought it was better closing this small one before starting massively working on 166. :)

akasolace commented 5 years ago

closed by #201