Class ArcGISRuntimeEnvironment


  • public class ArcGISRuntimeEnvironment
    extends Object
    Defines an ArcGIS Runtime Environment object.

    Contains methods that are global and affect the entire runtime environment. Also contains static methods to set up deployment licensing for an application.

    The use of some members in the ArcGIS Runtime API requires a specific license level. Please refer to Licensing details by class.

    Since:
    100.0.0
    • Constructor Detail

      • ArcGISRuntimeEnvironment

        public ArcGISRuntimeEnvironment()
    • Method Detail

      • getJavaVersion

        @Deprecated
        public static float getJavaVersion()
        Deprecated.
        As of 100.1.0, the version of JVM can be obtained from the system property "java.version".
        This property is deprecated and always returns 0.0.

        The version of JVM can be obtained from the system property "java.version".

        Returns:
        0.0
      • getResourcesDirectory

        public static File getResourcesDirectory()
        Returns the resources directory. A resources directory is not always required by the Runtime so this method may return a value that does not exist.
        Returns:
        the resources directory
        Throws:
        IllegalStateException - if the runtime has not been initialized
        Since:
        100.0.0
      • initialize

        public static void initialize()
        Initializes the runtime by loading dependencies such as the runtime and other client libraries.
        Throws:
        RuntimeException - if there is a failure
        Since:
        100.0.0
      • isInitialized

        public static boolean isInitialized()
        Indicates whether initialization was successful.
        Returns:
        true, if initialized; false otherwise
      • setInstallDirectory

        public static void setInstallDirectory​(String installDirectory)
        Sets the directory containing the runtime libraries and resources. This is an optional call, used if you want to override the standard locations for a runtime install.
        Parameters:
        installDirectory - directory containing the runtime libraries and resources
        Throws:
        RuntimeException - if this is called after runtime has initialized
        NullPointerException - if the input value is null
        Since:
        100.0.0
      • isLinux

        public static boolean isLinux()
        Checks if os.name contains Linux.
        Returns:
        true, if is Linux
      • isWindows

        public static boolean isWindows()
        Checks if os.name contains win.
        Returns:
        true, if is Windows
      • isOsx

        public static boolean isOsx()
        Checks if os.name contains os x.
        Returns:
        true, if is OSX
      • getAPIVersion

        public static String getAPIVersion()
        Returns the current API version.
        Returns:
        the API version.
      • getAPILabel

        @Deprecated
        public static String getAPILabel()
        Deprecated.
        As of 100.1.0, no replacement.
        Returns a label to identify this version of the API.
        Returns:
        the API label
        Since:
        100.0.0
      • setApiKey

        public static void setApiKey​(String apiKey)
        Sets the default API key to access API key enabled services and resources in ArcGIS Online.

        An API key is a unique key used to authorize access to specific services and resources in ArcGIS Online. It is also used to monitor access to those services. An API key is created and managed in the ArcGIS developer dashboard and is tied to a specific ArcGIS account.

        Set the API key on a specific ApiKeyResource to override this default key.

        Parameters:
        apiKey - the default API key to access API key enabled services and resources in ArcGIS Online
        Since:
        100.10.0
      • getApiKey

        public static String getApiKey()
        Gets the default API key to access API key enabled services and resources in ArcGIS Online.

        An API key is a unique key used to authorize access to specific services and resources in ArcGIS Online. It is also used to monitor access to those services. An API key is created and managed in the ArcGIS developer dashboard and is tied to a specific ArcGIS account.

        Set the API key on a specific ApiKeyResource to override this default key.

        Returns:
        the default API key to access API key enabled services and resources in ArcGIS Online
        Since:
        100.10.0