Class OpenBrowser


  • public final class OpenBrowser
    extends Object
    Helper to open platform web browser on different platforms This now delegates the real work to a platform specific class.
    • Method Detail

      • displayUrl

        public static String displayUrl​(URI uri)
        Displays an external URI using platform associated software. A web resource will launch platform's browser, an audio file URI will launch audio player, etc.
        Parameters:
        uri - The URI to display
        Returns:
        null for success or a string in case of an error.
        Throws:
        IllegalStateException - if no platform is set to which opening the URL can be dispatched, PlatformManager.getPlatform()
      • displayUrl

        public static String displayUrl​(String url)
        Displays an external URL using platform associated software. A web resource will launch platform's browser, an audio file URL will launch audio player, etc.
        Parameters:
        url - The URL to display
        Returns:
        null for success or a string in case of an error.
        Throws:
        IllegalStateException - if no platform is set to which opening the URL can be dispatched, PlatformManager.getPlatform()