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 code for the command-line application is now complete.<br />

DEPLOYMENT<br />

There are many options for deploying your Java application, and while you are<br />

free to choose any method you are comfortable with, this scenario utilizes the<br />

Ant build scripts you created earlier.<br />

Redo the build steps you tested earlier.<br />

1. Open a command prompt and use the “cd” command to change to the root<br />

folder of your project. For example:<br />

cd C:\TintoPoint<br />

2. You should have all the build script files located in this root directory.<br />

3. Type “arcgisant” at the command prompt.<br />

4. You should receive output similar to the following:<br />

Buildfile: build.xml<br />

init<br />

validate-engine:<br />

compile:<br />

execute:<br />

[java] Tin to Point: <strong>ArcGIS</strong> <strong>Engine</strong> <strong>Developer</strong> Sample<br />

[java] - Path to Tin: Q:\dop\data\imagery\tin\bachtin<br />

[java] - Calculating ...<br />

[java] - Path to Generated Shapefile:<br />

Q:\dop\data\workspace\newshp.shp<br />

[java] Tin to Point - Done<br />

run-scenario:<br />

BUILD SUCCESSFUL<br />

Total time: 9 seconds<br />

If for any reason your build fails, ensure you have your environment correctly set<br />

and parameters correctly set in the sample.properties file. If your build does not<br />

compile, ensure that your source code is correct.<br />

TROUBLESHOOTING<br />

If your build returns the following:<br />

Buildfile: build.xml<br />

init:<br />

validate-engine:<br />

compile:<br />

execute:<br />

[java] Tin to Point: <strong>ArcGIS</strong> <strong>Engine</strong> <strong>Developer</strong> Scenario<br />

[java] Usage: TintoPoint [Path-to-tin] [Path-to-output-shapefile]<br />

run-scenario:<br />

424 • <strong>ArcGIS</strong> <strong>Engine</strong> <strong>Developer</strong> <strong>Guide</strong><br />

BUILD SUCCESSFUL<br />

then your source code has successfully compiled, but you have not provided path<br />

variables in the sample.properties file.

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

Saved successfully!

Ooh no, something went wrong!