If you want to develop ArcGIS Engine applications using the ArcGIS Engine SDK for the Java Platform, you must have a compatible Java 2 Software Development Kit (JDK), either as a standalone install or as part of an IDE. You must also configure your environment correctly. If the environment is not correctly set, the Java classes will be unable to access core ArcObjects through Java Native Interface (JNI).
To configure your environment on Solaris and Linux, you first need to make sure you have the JAVA_HOME environment variable set and pointing to one of the supported JDKs.
For example:
setenv JAVA_HOME "/mymachine/java/jdk1.5.0_06"
Then source one of the init_java helper scripts that are found in the arcgis/java/tools directory, where arcgis is the install location.
.
On Windows, no post installation configuration is necessary.
On all platforms the minimum supported JDK version is 1.5.0_06.
Classpath
Your compilation environment for ArcGIS Engine applications must include arcobjects.jar by using the -classpath option, by adding it as a library in your IDE, or by whatever other method is appropriate for your development environment.
The arcobjects.jar file is located in $ARCGISHOME/java/lib on Solaris and Linux and in $ARCGISHOME/java/lib on Windows.
ARCGISHOME is a property set by the init_java script and it points to the installed location of the Engine Runtime.
The ArcGIS Engine SDK for the Java Platform includes numerous sample applications, each of which is delivered with ANT scripts as well as executable JAR files. Each executable JAR is in the bin folder of each sample. ANT is a Java-based build tool that uses build scripts written in XML. You can either load these samples into your preferred development environment or use the ANT scripts to compile and run them or import them into your IDE as a project (each sample is bundled as an Eclipse IDE project).
If you wish to use the ANT scripts, you should have a working ANT installation.
For the ArcGIS Engine samples, ANT version 1.6 or higher will work.
For your convenience, a version of ANT, arcgisant, is included under the %ARCGISHOME%\java\tools directory on Windows and the %ARCGISHOME%/java/tools directory on Solaris and Linux.
The ANT scripts included with the samples require the following environment setting:
For example:
ANT_HOME=C:\ArcGIS\java\tools\ant
Solaris and Linux developers can source arcgis/java/tools/setenv_ant.csh or setenv_ant.sh, which sets this variable and includes arcgisant's bin directory in the PATH.
If you use the command line as an important part of your development environment, you may want to include your JDK's bin directory and ANT's bin directory in your path.
PATH=...;%JAVA_HOME%\bin;%ANT_HOME%\bin