Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8269967

JavaFX should fail fast on macOS below minimum version



    • Bug
    • Resolution: Fixed
    • P3
    • jfx18
    • jfx17
    • javafx


      This is a follow-on fix to JDK-8266743.

      The JavaFX build specifies the minimum version of macOS on which it will run. This allows using APIs from that minimum version without checking for their availability at runtime.

      If there are any `@available` checks in the code less than or equal to that minimum, the clang compiler will elide these checks so that no checking is done at runtime. This would be fine if macOS failed to load a binary that targets a newer library, but in the case of dylibs, it loads it, which then leads to a runtime crash. This sort of accidental, deferred failure leads to a bad experience, and was the cause of JDK-8266743. Given where we were in the JavaFX release, we decided to revert the change to the minimum version back to 10.10.

      Regardless of what the minimum version is, we should add a check to the platform initialization code to verify that version and "fail fast" on an attempt to run on any older version. Otherwise, we will continue to have the possibility of a similar crash on an older version of macOS.

      Separately, we plan to bump the minimum version to 10.12 again for JavaFX 18 -- see JDK-8269968.


        Issue Links



              kcr Kevin Rushforth
              kcr Kevin Rushforth
              0 Vote for this issue
              3 Start watching this issue