Mac: app requires Java 1.8, which is not found even though it is installed

Description

Under Mac OS Sierra 10.12.4, when I create an installer that requires Java 1.8, the installer fails with the following dialog:

However, Java 1.8 is installed on my machine and available.

BTW - There is a good chance that I installed Java 1.6.0_65 via https://support.apple.com/kb/dl1572?locale=en_US to get a legacy app to work.

izpack is using JavaApplicationStub, which I believe only supports Apple Java 1.6. A better solution is to use the universalJavaApplicationStub from https://github.com/tofi86/universalJavaApplicationStub

I've forked the izpack repo at https://github.com/cxbrooks/izpack and added support for universalJavaApplicationStub.

The changes were:

After making the above modifications, creating a new izpack installer and rebuilding my installer with

my installer finds Java 1.8 and works!

BTW - it looks like someone is using universalJavaApplicationStub with izpack to create Mac apps, see https://github.com/dtuma/processdash/blob/master/installer/install.xml

It could be that better supporting universalJavaApplicationStub would be a good thing.

Environment

Mac OS Sierra 10.12.4

Assignee

Christopher Brooks

Reporter

Christopher Brooks

Impact

Functional - may break existing environments

Components

Sprint

None

Fix versions

Affects versions

Priority

Medium
Configure