Description | API | Development Configuration | Deployment Configuration | FAQ

STK Java API - AWT/Swing Custom Application


This application type is used to utilize STK's analysis engine and embed its visualization controls (3D Globe, 2D Map, Gfx Analysis) into your existing or new AWT/Swing-based GUI application. Note that the visualization and analysis computations in the STK Engine occur within your Java application process and run on the AWT Event Dispatch Thread.

Abstract Window Toolkit (AWT) / Swing extension

What's included in this API?

The API to develop, run, and deploy an STK Custom Application based on the AWT/Swing UI window framework, which is based on the STK Java API, includes the following lists of libraries, packages, and javadocs:

JAR libraries:

JNI native libraries:



To use these samples:

  1. Build these samples in Eclipse by referring to Eclipse samples configuration.
  2. Right click on the Java file that contains a main method within any sample Eclipse project and choose Run as -> Java Application.

Development/Runtime Configuration

Development Environments

Use the above listed JAR and JNI native libraries as input to the following development environment configurations:

Use the samples listed above as reference for implementing an AWT/Swing Custom Application.


Deployment instructions for a STK Custom Application.

  1. Follow the appropriate deployment instructions for an STK or STK Engine application.
  2. Locate the JavaDevKit directory in the STK 11 or STK Engine 11's installation area, for instance:
  3. Platform Path
    Windows 32bit C:\Program Files\AGI\STK 11\bin
    Windows 64bit C:\Program Files\AGI\STK 11\bin
    Windows 32bit on 64bit C:\Program Files (x86)\AGI\STK 11\bin
    Linux 32/64 <STK_INSTALL_DIR>/bin
  4. Add the jar files located in the bin directory to your Java application's runtime environment's CLASSPATH environment variable or the Java Virtual Machine's (java.exe) classpath input argument.
  5. Add the bin directory to your Java application's runtime environment's PATH environment variable on windows or LD_LIBRARY_PATH on Linux, or the Java Virtual Machine's (java.exe) equivalent native library path setting such that the AGI jar files can load the native AgJNI*.dlls(libagjni*.so on Linux) that are in that directory.


A set of frequently asked questions/issues and their answers/solutions.


How do I init/uninit my console application to use STK Custom Application?

Typically, console applications do not utilize GUI functionality as are provided by frameworks such as AWT and SWT. However, at this time the STK Java API does not provide an initialization/uninitialization strategy for non-GUI applications. As such, one must initialize/uninitialize their console applications that use the STK Java API with one of the window framework initialization/uninitialization strategies, ergo AWT or SWT. This is a known issue that will be resolved in a future release. The AWT window framework initialization/uninitialization strategy is recommended in this case, an example of which follows:

Note: This initialization/uninitialization strategy may require further configuration of the Java Runtime's CLASSPATH setting to add dependencies on either the AWT or SWT window framework JAR libraries depending on the runtime configuration of running context of the GUI-less application.

How do I init/uninit my AWT Based GUI application to use STK Custom Application?
How do I init/uninit my application to use STK Custom Application without the Object Model / Astrogator / Vector Geometry Tool / Graphics API?

STK Engine for UNIX 11.2