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
      • getServiceCurveGeometryMode

        public static ServiceCurveGeometryMode getServiceCurveGeometryMode()
        Determines if curve geometries are fetched from and sent to services that support them.

        By default, curve geometries are not fetched from services that support curves, meaning that densified versions of any curve geometries are fetched from the service. To instead fetch original geometries with curve segments (those where Geometry.hasCurves() is true), set this property to ServiceCurveGeometryMode.FETCH_CURVES. Ensure that you do this before any calls to services are made, as it cannot be changed after the first request has begun.

        By default, Runtime indicates that is it not a true curve capable client when sending updates to services that support curves. This means that curve geometries stored in services where ArcGISFeatureServiceInfo.isOnlyAllowTrueCurveUpdatesByTrueCurveClients() is true cannot be updated by default. To update such geometries, ensure your app correctly handles curve segments in geometries throughout the workflow and set this property to ServiceCurveGeometryMode.TRUE_CURVE_CLIENT. You must do this before any calls to services are made - it cannot be changed after making the first request.

        For details of curve support in services, see ArcGIS REST API documentation.

        For services that don't support curves, this value has no effect. It also has no effect on local data sources that may contain curve geometries, such as mobile geodatabases or mobile map packages created using ArcGIS Pro.

        Some geometry operations do not support curve geometries; see GeometryEngine for details of curve support. SketchEditor does not support curve geometries.

        Returns:
        determines if curve geometries are fetched from and sent to services that support them
        Since:
        100.12.0
        See Also:
        Geometry.hasCurves()
      • setServiceCurveGeometryMode

        public static void setServiceCurveGeometryMode​(ServiceCurveGeometryMode serviceCurveGeometryMode)
        Determines if curve geometries are fetched from and sent to services that support them.

        By default, curve geometries are not fetched from services that support curves, meaning that densified versions of any curve geometries are fetched from the service. To instead fetch original geometries with curve segments (those where Geometry.hasCurves() is true), set this property to ServiceCurveGeometryMode.FETCH_CURVES. Ensure that you do this before any calls to services are made, as it cannot be changed after the first request has begun.

        By default, Runtime indicates that is it not a true curve capable client when sending updates to services that support curves. This means that curve geometries stored in services where ArcGISFeatureServiceInfo.isOnlyAllowTrueCurveUpdatesByTrueCurveClients() is true cannot be updated by default. To update such geometries, ensure your app correctly handles curve segments in geometries throughout the workflow and set this property to ServiceCurveGeometryMode.TRUE_CURVE_CLIENT. You must do this before any calls to services are made - it cannot be changed after making the first request.

        For details of curve support in services, see ArcGIS REST API documentation.

        For services that don't support curves, this value has no effect. It also has no effect on local data sources that may contain curve geometries, such as mobile geodatabases or mobile map packages created using ArcGIS Pro.

        Some geometry operations do not support curve geometries; see GeometryEngine for details of curve support. SketchEditor does not support curve geometries.

        Parameters:
        serviceCurveGeometryMode - determines if curve geometries are fetched from and sent to services that support them
        Throws:
        IllegalArgumentException - if serviceCurveGeometryMode is null
        ArcGISRuntimeException - if attempt was made too late to change if curves are fetched from or sent to services
        Since:
        100.12.0
        See Also:
        Geometry.hasCurves()