Class FxVersionUtil

java.lang.Object
app.supernaut.fx.util.FxVersionUtil

public class FxVersionUtil extends Object
Various utilities methods for testing the current FX version and environment
  • Constructor Details

  • Method Details

    • getJavaFXVersion

      Returns:
      The JavaFX Runtime Version in ModuleDescriptor.Version format
    • isShowDocumentAvailable

      public static boolean isShowDocumentAvailable()
      Is HostServices.showDocument(String) available?

      Hyperlinks don't work on macOS in Graal native-image yet, but they should be available in the next EA release of OpenJFX 18.

      For Browser open to be available one of the following must be true:

      • OS is not macOS
      • Not running in GraalVM native image
      • JavaFX is later than MACOS_NATIVE_SHOW_DOC_VERSION
      NOTE: Currently we can only reliably check if we're macOS or not, so that's all we are checking.
      Returns:
      true if available, false if not
      See Also:
    • hasMacShowDocumentFix

      public static boolean hasMacShowDocumentFix()
      Returns:
      true if this JavaFX version has the fix for macOS native-image showDocument
    • isMacOS

      public static boolean isMacOS()
      Returns:
      true if we're running on macOS