We're updating the issue view to help you get more done. 

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:

1 The application that you are trying to install requires a 1.8 version or later of the Java platform. You are running a 1.6.0_65 version of the Java platform. Please upgrade to a new version.

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:

1 2 3 4 5 6 7 modified: izpack-api/src/test/resources/com/izforge/izpack/api/adaptator/partial.xml modified: izpack-compiler/src/test/resources/bindingTest.xml modified: izpack-dist/src/main/izpack/install.xml modified: izpack-wrapper/src/main/resources/utils/wrappers/izpack2app/Mac-App-Template/Contents/Info.plist deleted: izpack-wrapper/src/main/resources/utils/wrappers/izpack2app/Mac-App-Template/Contents/MacOS/JavaApplicationStub new file: izpack-wrapper/src/main/resources/utils/wrappers/izpack2app/Mac-App-Template/Contents/MacOS/universalJavaApplicationStub new file: izpack-wrapper/src/main/resources/utils/wrappers/izpack2app/Mac-App-Template/Contents/MacOS/universalJavaApplicationStub-LICENSE

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

1 python $PTII/vendors/izpack/utils/wrappers/izpack2app/izpack2app.py ptII11.0.devel.setup.mac.jar ptII11.0.devel.setup.mac.app

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

Status

Assignee

Christopher Brooks

Reporter

Christopher Brooks

Labels

None

Impact

Functional - may break existing environments

External issue ID

None

External issue ID

None

External issue ID

None

External issue ID

None

Components

Sprint

None

Fix versions

Affects versions

5.1.0

Priority

Medium