Module java.jnlp
Package javax.jnlp

Interface BasicService

  • public interface BasicService
    The BasicService interface provides access to the codebase of the application, if an application is run in offline mode, and simple interaction with the native browser on the given platform.

    This interface mimics loosely the AppletContext functionality.

    • Method Detail

      • getCodeBase

        URL getCodeBase()
        Returns the codebase for the application. The codebase is either specified directly in the JNLP file, or it is the location of the JAR file containing the main class of the application.
        a URL with the codebase of the application, or null if the application is running from local file system.
      • isOffline

        boolean isOffline()
        Determines if the system is offline. The return value represents the JNLP client's "best guess" at the online / offline state of the client system. The return value is does not have to be guaranteed to be reliable, as it is sometimes difficult to ascertain the true online / offline state of a client system.
        true if the system is offline, otherwise false
      • showDocument

        boolean showDocument​(URL url)
        Directs a browser on the client to show the given URL. This will typically replace the page currently being viewed in a browser with the given URL, or cause a browser to be launched that will show the given URL.
        url - an URL giving the location of the document. A relative URL will be relative to the codebase.
        true if the request succeded false if the url is null or the request failed.
      • isWebBrowserSupported

        boolean isWebBrowserSupported()
        Checks if a Web browser is supported on the current platform and by the given JNLP Client. If this is not the case, then showDocument( will always return false.
        true if a Web browser is supported, otherwise false