This topic describes the prerequisites for developing extensions with ArcGIS Enterprise SDK in Java. You must complete the following steps:
- Download JDK and Maven
- Download and install a compatible Java development kit (JDK).
- Download and install a Maven binary archive.
- Set environment variables
- Add the installed JDK to the
JAVA
and_HOME PATH
environment variables. - Add the Maven installation path to the
PATH
environment variable. - Add the
ENTDEVKITJAVA
environment variable.
- Add the installed JDK to the
The ENTDEVKITJAVA
environment variable is automatically added during the Enterprise SDK installation on a Windows environment. On a Linux environment, you must set it manually (see set environment variables).
Download JDK and Maven
To develop extensions with ArcGIS Enterprise SDK in Java, you must have a compatible JDK as a stand-alone installation, or as part of an integrated development environment (IDE). If the environment is not set correctly, the Java proxies will be unable to access core ArcGIS Enterprise SDK objects through the Java Native Interface (JNI).
You can download and install Oracle JDK, AdoptOpenJDK, or another JDK from your designated vendor based on your organization's requirement. Be sure the version of the JDK meets the ArcGIS Enterprise SDK system requirements. For ArcGIS Enterprise SDK 11.3, the supported JDK version is 17, at the same time, the JDK 11 also works for ArcGIS Enterprise SDK 11.3. However, building SOE or SOI with Java 18 or later is not supported.
As ArcGIS Enterprise SDK uses the Maven framework to manage the Java SOE and SOI projects, you must download and install Maven. Maven binary archives can be downloaded here. Be sure the version of Maven meets the SDK's system requirements. For ArcGIS Enterprise SDK 11.3, the supported Maven version is 3.8.8 or later. For Linux machines, choose the binary tar.gz archive link. For Windows machine, choose the binary zip archive file. After the Maven archive is downloaded, extract the file to your machine. To learn more about Maven, visit Apache Maven.
Set environment variables
After installing JDK and Maven, you must set the environment variable with your installed JDK and Maven. At the same time, ensure the SDK's environment variable ENTDEVKITJAVA
is also set correctly. You can use the export
Bash command to set these environment variables together as follows:
Linux
-
Type the following command in the terminal to open the SDK user's user profile.
Use dark colors for code blocks Copy [ags@linuxmachine ~]$ nano ~/.bash_profile
The above command opens the user profile of the SDK user
ags
from thenano
text editor. You can also choose other text editors based on your preference, such asvi
,gedit
, and so on. -
Add environment variables for the SDK user.
Add the
JAVA
and_HOME ENTDEVKITJAVA
environment variables. Add theJAVA
and Maven installation path to the_HOME PATH
environment variable.Use dark colors for code blocks Copy export JAVA_HOME=/home/ags/opt/jdk-17.0.10 export ENTDEVKITJAVA=/home/ags/arcgis/enterprisesdk PATH=$JAVA_HOME/bin:/home/ags/sdk/apache-maven-3.8.8/bin:$PATH:$HOME/.local/bin:$HOME/bin export PATH
JAVA
should be the JDK path._HOME ENTDEVKITJAVA
should be the ArcGIS Enterprise SDK installation path. By default, it's/home/
.<sdkuser >/arcgis/enterprisesdk -
Press Ctrl + X, press Y, and press Enter to save the edits.
-
Use the
source
command to apply the above changes tobash
._profile Use dark colors for code blocks Copy [ags@linuxmachine ~]$ source ~/.bash_profile
-
Type
java -version
in the terminal. It should show the version number of the installed JDK you set forJAVA
. Type_HOME mvn -version
in the terminal. It should show the correct Maven version number along with the JDK version number. Typeecho $
in the terminal. It should show the path of the ArcGIS Enterprise SDK installation.ENTDEVKITJAVA
Windows
On Windows, the JAVA
and Maven environment variables can be created from the System Properties dialog box.
-
To access the System Properties dialog box, click Start and click Control Panel.
-
In the Control Panel window, search for View advanced system settings and click the item. The System Properties dialog box appears. (This step may vary depending on your Windows operating system version).
-
On the System Properties dialog box, click Environment Variables. The Environment Variables dialog box appears.
-
On the Environment Variables dialog box, click New to create a new system variable if it's not set yet. Otherwise, click Edit to edit existing system variables.
-
Ensure
ENTDEVKITJAVA
,JAVA
, and_HOME PATH
environment variables are set as follows:ENTDEVKITJAVA
is set to the Enterprise SDK installation path (by default,C
).:\ Program Files\ ArcGI S\ Enterprise SD K\ JAVA
is the installed JDK path. Last, ensure you add locations of both the JDK bin folder and the Maven bin folder to_HOME PATH
. To check which version of Java and Maven should be used, refer to ArcGIS Enterprise SDK system requirements. -
Click OK on the Environment Variables dialog box and click OK on the System Properties dialog box to apply the changes.
-
Open a command prompt or command shell and type
java -version
. It should show the version number of your Java installation. Typemvn -version
. It should show the correct Maven version number along with the JDK version number. Typeecho %
in the terminal. It should show the path of the Enterprise SDK installation.ENTDEVKITJAV A%
After you finish setting up the Java and Maven environment variables, you can continue to install the Maven artifacts.