18.04.2015 Views

ArcGIS Engine Developer Guide

ArcGIS Engine Developer Guide

ArcGIS Engine Developer Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

BUILDING A COMMAND-LINE JAVA APPLICATION<br />

The <strong>ArcGIS</strong> developer samples are not included<br />

in the typical installation of the <strong>ArcGIS</strong> <strong>Engine</strong><br />

<strong>Developer</strong> Kit. If you do not have them installed,<br />

rerun the <strong>Developer</strong> Kit Install wizard, click<br />

Custom or Modify, and click the samples feature<br />

under Software <strong>Developer</strong> Kit.<br />

• An installation of the Java 2 Platform, Standard Edition Software Development<br />

Kit. See http://support.esri.com for information about supported versions<br />

of the J2SE SDK. If you do not already have one available, download it from<br />

the Java Web site at http://java.sun.com/j2se/downloads.html.<br />

• A Java IDE of your choice or your favorite text editor.<br />

• An understanding of basic Java programming concepts such as classes, inheritance,<br />

and using packages.<br />

• While no experience with other ESRI software is required, previous experience<br />

with ArcObjects is helpful.<br />

• A TIN dataset.<br />

• Access to the sample data and code that comes with this scenario.<br />

\developerKit\samples\<strong>Developer</strong>Kit\samples\<br />

<strong>Developer</strong>_<strong>Guide</strong>_Scenarios\Converting_A_Tin_To_Point_ShapefileJava.zip<br />

Objects from the following packages will be used:<br />

• com.esri.arcgis.datasourcesfile • com.esri.arcgis.geometry<br />

• com.esri.arcgis.geodatabase • com.esri.arcgis.system<br />

IMPLEMENTATION<br />

To implement this scenario, follow the steps below. This implementation provides<br />

you with all the code you will need to successfully complete the scenario. It does<br />

not provide step-by-step instructions to develop applications in Java, as it assumes<br />

that you have a working knowledge of the development environment<br />

already.<br />

For cross-platform compatibility, the data and<br />

pathnames used must be lowercased.<br />

Setting up environment variables on Windows<br />

Any Windows user can add, modify, or remove a user environment variable.<br />

Setting such environment variables will make most effective use of this scenario.<br />

You will add three environment variables and their respective executable (bin)<br />

folders to the global PATH variable.<br />

1. Right-click My Computer, then click Properties.<br />

2. Click the Advanced tab.<br />

3. Click Environment Variables.<br />

4. Under System Variables click New.<br />

For Variable name: type “ARCENGINEHOME”.<br />

For Variable value: type in the root level <strong>ArcGIS</strong> <strong>Engine</strong> install directory (for<br />

example, “C:\<strong>ArcGIS</strong>”).<br />

5. Click OK.<br />

6. Under System variables click Path and click Edit.<br />

7. Append the following to the beginning of Variable value:<br />

%ARCENGINEHOME%\bin;<br />

8. Click OK until you have closed all System Properties dialog boxes.<br />

Repeat the steps above to add the following environment variables:<br />

• JAVA_HOME=J2SE SDK install directory<br />

410 • <strong>ArcGIS</strong> <strong>Engine</strong> <strong>Developer</strong> <strong>Guide</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!