A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developers.arcgis.com/java/install-and-set-up/ below:

Install and set up | ArcGIS Maps SDK for Java

Before installing the API, make sure your development machine meets the system requirements.

Note

Contact RuntimeRetiredProducts@esri.com if you need access to a retired version of ArcGIS Runtime.

An app built with ArcGIS Maps SDK for Java requires the following dependencies:

There are three ways to get set up with the API:

Note

If you are working in a restricted development environment, where you may not have online access or you do not have permission to write files to the user directory, choose the download option.

Get the API with Gradle

The buildscript below shows how to get these dependencies using the Gradle build tool.

For a starter project using Gradle with instructions for Eclipse and IntelliJ, download or clone the java-gradle-starter-project on GitHub.

Use dark colors for code blocks Copy

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
plugins {
    id 'application'
    id 'org.openjfx.javafxplugin' version '0.1.0'
    id 'idea'
}

idea {
    module {
        downloadJavadoc = true
    }
}

ext {
    arcgisVersion = '200.6.0'
}

repositories {
    mavenCentral()
    maven {
        url 'https://esri.jfrog.io/artifactory/arcgis'
    }
}

configurations {
    natives
}

dependencies {
    implementation "com.esri.arcgisruntime:arcgis-java:$arcgisVersion"
    natives "com.esri.arcgisruntime:arcgis-java-jnilibs:$arcgisVersion"
    natives "com.esri.arcgisruntime:arcgis-java-resources:$arcgisVersion"
    // handle SLF4J http://www.slf4j.org/codes.html#StaticLoggerBinder using a no-operation logger
    implementation "org.slf4j:slf4j-nop:2.0.16"
}

javafx {
    version = "21.0.5"
    modules = [ 'javafx.controls', 'javafx.graphics', 'javafx.fxml', 'javafx.web', 'javafx.media' ]
}

task copyNatives(type: Copy) {
    description = "Copies the arcgis native libraries into the .arcgis directory for development."
    group = "build"
    configurations.natives.asFileTree.each {
        from(zipTree(it))
    }
    into "${System.properties.getProperty("user.home")}/.arcgis/$arcgisVersion"
}

run {
    dependsOn copyNatives
}

The copyNatives task in this Gradle build script will automatically download and unpack the libraries into $USER_HOME/.arcgis directory. The API looks in this directory to find the required libraries.

Note

It may take a minute to download the libraries depending on bandwidth, but this will only happen once after the libraries are cached.

Configure the libraries

For your app to run, the API must be able to find the API's required libraries. If you got the API using Gradle, the libraries have been downloaded to your user directory in the .arcgis folder. Since the API can automatically find the required libraries at this location, no further configuration is necessary.

Get the API with Maven

The pom file below shows how to get the required dependencies using the Maven build tool.

For a starter project using Maven with instructions for Eclipse and IntelliJ, download or clone the java-maven-starter-project on GitHub.

Use dark colors for code blocks Copy

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.mycompany</groupId>
    <artifactId>app</artifactId>
    <packaging>jar</packaging>
    <version>1.0-SNAPSHOT</version>
    <name>My Map App</name>
    <url>http://maven.apache.org</url>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <arcgis.version>200.6.0</arcgis.version>
    </properties>
    <repositories>
        <repository>
            <id>arcgis</id>
            <url>https://esri.jfrog.io/artifactory/arcgis</url>
        </repository>
    </repositories>
    <dependencies>
        <!--JavaFX dependencies -->
        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-controls</artifactId>
            <version>21.0.5</version>
        </dependency>
        <!--ArcGIS dependencies -->
        <dependency>
            <groupId>com.esri.arcgisruntime</groupId>
            <artifactId>arcgis-java</artifactId>
            <version>${arcgis.version}</version>
        </dependency>
        <dependency>
            <groupId>com.esri.arcgisruntime</groupId>
            <artifactId>arcgis-java-jnilibs</artifactId>
            <version>${arcgis.version}</version>
            <type>zip</type>
        </dependency>
        <dependency>
            <groupId>com.esri.arcgisruntime</groupId>
            <artifactId>arcgis-java-resources</artifactId>
            <version>${arcgis.version}</version>
            <type>zip</type>
        </dependency>
        <!--SLF4J dependencies-->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-nop</artifactId>
            <version>1.7.36</version>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>3.1.1</version>
                <configuration>
                    <artifactItems>
                        <artifactItem>
                            <groupId>com.esri.arcgisruntime</groupId>
                            <artifactId>arcgis-java-jnilibs</artifactId>
                            <version>${arcgis.version}</version>
                            <type>zip</type>
                            <overWrite>false</overWrite>
                            <outputDirectory>${user.home}/.arcgis/${arcgis.version}</outputDirectory>
                        </artifactItem>
                        <artifactItem>
                            <groupId>com.esri.arcgisruntime</groupId>
                            <artifactId>arcgis-java-resources</artifactId>
                            <version>${arcgis.version}</version>
                            <type>zip</type>
                            <overWrite>false</overWrite>
                            <outputDirectory>${user.home}/.arcgis/${arcgis.version}</outputDirectory>
                        </artifactItem>
                    </artifactItems>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.0</version>
                <configuration>
                    <release>11</release>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <version>1.6.0</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>java</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <mainClass>com.mycompany.app.App</mainClass>
                </configuration>
            </plugin>
            <plugin>
                <groupId>io.takari</groupId>
                <artifactId>maven</artifactId>
                <version>0.7.4</version>
            </plugin>
        </plugins>
    </build>
</project>

Run the Maven dependency:unpack goal. This will unpack the required libraries into $USER_HOME/.arcgis.

Note

It may take a minute to download the required libraries depending on your bandwidth. This will only happen once since the libraries are cached.

Configure the libraries

For your app to run, the API must be able to find the required libraries. If you got the API using Maven, the libraries have been downloaded to your user directory in the ~/.arcgis folder. Since the API can automatically find the libraries at this location, no further configuration is necessary.

Getting the API manually

If you don't want to use a build tool like Gradle or Maven, you can download and set up the dependencies manually.

For a starter project using the API .zip file with instructions for Eclipse and IntelliJ, download or clone the java-zip-starter-project on GitHub.

For the API dependencies:

  1. Download ArcGIS Maps SDK for Java as a .zip or .tgz.
  2. Extract the archive contents and copy the libs, jniLibs, and resources folders into the root of your project directory.
  3. Add all of the jars in the libs folder to your classpath.

For the OpenJFX dependencies:

  1. Download the OpenJFX SDK (17.0.13 or 21.0.5) from Gluon.
  2. Extract the archive contents and copy the directory into the root of your project directory.
  3. Add the JavaFX jars to your module path. The API requires the javafx.controls, javafx.fxml, javafx.web, javafx.media, and javafx.graphics modules. Refer to Gluon's documentation for setup instructions.
Configure the native libraries

For your app to run, the API must be able to find the required libraries. You have a few options, ordered here by priority:

  1. The absolute path to the downloaded API specified programmatically at the start of your app's code:

    Use dark colors for code blocks Copy

    1
    ArcGISRuntimeEnvironment.setInstallDirectory("C:/path/to/arcgis-maps-sdk-java-200.6.0")
  2. The current working directory according to Java's user.dir system property. This is usually the project's root directory when run from an IDE, or the directory from which you run your app's jar.

  3. The location you specify by the environment variable ARCGISRUNTIMESDKJAVA_200_6_0.

Note

You should not use any of the .zip configurations if you are using the Gradle or Maven workflows.

If the native libraries are not properly configured, you will see an exception similar to the following:

Use dark colors for code blocks Copy

1
2
3
4
5
Caused by: java.lang.RuntimeException: Could not find runtime in any of:
- A directory specified by calling ArcGISRuntimeEnvironment.setInstallDirectory()
- The current directory C:\Users\johndoe\my-project-directory
- A location specified by the environment variable ARCGISRUNTIMESDKJAVA_200_6_0
- Within the ".arcgis" directory in the user's home path C:\Users\johndoe\.arcgis
Additional downloads

Additional sources of sample code, data, and tools are available to enhance your development projects. You can even download this guide as stand-alone developer documentation.

Sample code

Review sample code in our complete sample directory, or download the code from our GitHub repository. Interact with live samples using the sample viewer app.

ArcGIS Maps SDK for Java Toolkit

ArcGIS Maps SDK for Java Toolkit contains controls and utilities to simplify your app development. For example:

Local Server

Local Server enables you to run offline geoprocessing tasks to provide advanced spatial analysis and data manipulation in your applications. These tasks work in the same way as geoprocessing tasks running on ArcGIS Enterprise. If you want to run offline geoprocessing tasks in your app, install Local Server following the steps in Local Server.

Stand-alone developer documentation

You can download the developer documentation as an archive from the downloads page. The archive contains instructions to serve the documentation from a local web server so you can access it without a connection to the internet. The stand-alone documentation includes the developer guide, API reference, tutorials, and samples documentation. This documentation is designed to run on a local stand-alone computer or on an internal network and not on the public internet.

Attention

The free open-source file archive utility 7-Zip is recommended to extract the downloaded documentation archive.

To serve the documentation locally:

Note

While the live documentation site is updated periodically between releases, the stand-alone documentation is static and is not updated after its initial release.

Supplemental data StreetMap Premium

StreetMap Premium delivers a high-quality, multiscale cartographic map display with enriched street data. In addition, it provides accurate geocoding, optimized routing, easy to follow directions, and powerful network analysis. StreetMap Premium maps can simultaneously fulfill the need for an address locator, street network dataset, and basemap in your apps. They are consistent across all regions of the world and are available for both online, connected scenarios and for use in offline, disconnected scenarios in the form of mobile map packages.

If you want to use StreetMap Premium data (the StreetMap Premium extension), download the demonstration data from the downloads page for development and testing. Please contact Esri Customer Service for access to a region of your choice for development and testing or to license StreetMap Premium data for deployment.

Projection Engine data

Datum transformations are used when geometries must be projected from one spatial reference to another when there is a difference in the datum that underlies the two spatial references. Datum transformations can be mathematically defined (equation-based transformations), or may rely on external supporting files (grid-based transformations). Certain Projection Engine data files must be present when you use a grid-based transformation in your app; attempting to use a transformation with missing Projection Engine files will cause an error. The API can detect whether the necessary files are available on the local file system.

If your app requires grid-based transformations, you can download supporting Projection Engine files from the downloads page. See the Spatial references topic for more information about working with coordinate systems, projections, and datum transformations.

Electronic Navigational Charts (ENC)

Electronic navigational charts (ENCs) are georeferenced vector datasets for the visualization and analysis of hydrographic and maritime information. This SDK supports ENCs that conform to the International Hydrographic Organization (IHO) S-57 standard.

If you want to work with Electronic Navigational Charts (ENC) download the hydrography directory from the downloads page.

See the Display electronic navigational charts topic for more information about working with ENC data.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4