Uploaded image for project: 'IzPack'
  1. IZPACK-1562

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


    • Type: Bug
    • Status: Resolved
    • Priority: Medium
    • Resolution: Fixed
    • Affects versions: 5.1.0
    • Fix versions: 5.1.2
    • Components: Native launcher
    • Environment:

      Mac OS Sierra 10.12.4

    • Impact:
      Functional - may break existing environments
    • Sprint:
      Sprint - Release 5.1.2


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

      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:

              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

      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.




            • Assignee:
              cxbrooks Christopher Brooks
              cxbrooks Christopher Brooks
            • Votes:
              0 Vote for this issue
              2 Start watching this issue


              • Created: