The following instructions explain how to compile and run the STK Java API code samples provided in the STK install with Apache Ant. The instructions assume you have already installed Ant and configured it to run on the command line.
ant -Dstk.install.dir="C:\Program Files (x86)\AGI\STK 11" run
Note: Besides the run target, the Ant scripts also contain a compile and a clean target. There is also a top level ant script that will compile all samples inside the current directory. These are located in the folders named Java (Ex: <STK_INSTALL_DIR>/CodeSamples/CustomApplications/Java). This script only has a compile and a clean target.
STK 11.2.1 Programming Interface