STK Java API - SWT Custom Application
Description
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 SWT-based GUI application. Note that the visualization and analysis computations in the STK Engine occur within your Java application process and run on the SWT UI Event Thread.
What's included in this API?
The API to develop/run/deploy an STK Custom Application based on SWT UI window framework based on the STK Java API includes the following lists of libraries/packages/javadocs include:
JAR libraries:
- agi.core.jar
- agi.core.swt.jar
- agi.stkutil.jar
- agi.stkobjects.jar
- agi.stkobjects.astrogator.jar
- agi.stkobjects.aviator.jar
- agi.stkvgt.jar
- agi.stkgraphics.jar
- agi.stkx.jar
- agi.stkx.swt.jar
JNI native libraries:
- AgJNICore.dll/libagjnicore.so
- AgJNIStkUtil.dll/libagjnistkutil.so
- AgJNIStkObjects.dll/libagjnistkobjects.so
- AgJNIStkGator.dll/libagjnistkgator.so
- AgJNIStkAvtr.dll/libagjnistkavtr.so
- AgJNIStkVGT.dll/libagjnistkvgt.so
- AgJNIStkGraphics.dll/libagjnistkgraphics.so
- AgJNIStkX.dll/libagjnistkx.so
Packages:
- agi.*
- agi.core.*
- agi.core.swt.*
- agi.stkutil.*
- agi.stkobjects.*
- agi.stkobjects.astrogator.*
- agi.stkobjects.aviator.*
- agi.stkvgt.*
- agi.stkgraphics.*
- agi.stkx.*
- agi.stkx.swt.*
Documentation
- Documentation for including Javadocs in Eclipse IDE
- STK Custom Application samples are provided within the STK and STK Engine install. To configure/run these samples can be found on the Eclipse samples configuration page.
To use these samples:
- Build these samples in Eclipse by referring to the Eclipse samples configuration page.
- 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:
- Standalone environment - Instructions to configure a non-GUI development environment for developing the Java Custom Application.
- Eclipse IDE - Instructions to configure an Eclipse Java application development project.
Use the samples listed above as reference for implementing an AWT/Swing Custom Application.
Deployment
Deployment instructions for a STK Custom Application.
- Follow the appropriate deployment instructions for an STK or STK Engine application.
- Locate the "JavaDevKit" folder in the STK 13 or STK Engine 13 installation area, for instance:
- 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.
- 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.
Platform | Path |
---|---|
Windows 64bit | <Install_Dir>\bin |
Linux | <Install_Dir>/bin |
FAQ
A set of frequently asked questions/issues and their answers/solutions.
Topics
- How do I init/uninit my SWT 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?
How do I init/uninit my SWT Based GUI application to use STK Custom Application?
- Initialization:
- Uninitialization:
agi.core.swt.AgSwt_JNI.initialize_SwtDelegate();
agi.stkengine.AgStkCustomApplication_JNI.initialize(true);
agi.core.swt.AgSwt_JNI.initialize_SwtComponents();
this is the reverse order of the preceding initialize.
agi.core.swt.AgSwt_JNI.uninitialize_SwtComponents();
agi.stkengine.AgStkCustomApplication_JNI.uninitialize();
agi.core.swt.AgSwt_JNI.uninitialize_SwtDelegate();
How do I init/uninit my application to use STK Custom Application without the Object Model / Astrogator / Vector Geometry Tool / Graphics API?
- Initializing/Uninitializing with the following techniques will allow you to exclude the following binaries from your development and runtime configuration:
agi.stkobjects.jar
AgJNIStkObjects.dll/libagjnistkobjects.so
agi.stkobjects.astrogator.jar
AgJNIStkGator.dll/libagjnistkgator.so
agi.stkobjects.aviator.jar
AgJNIStkAvtr.dll/libagjnistkavtr.so
agi.stkvgt.jar
AgJNIStkVGT.dll/libagjnistkvgt.so
agi.stkgraphics.jar
AgJNIStkGraphics.dll/libagjnistkgraphics.so
- Initialization:
- Uninitialization:
agi.core.swt.AgSwt_JNI.initialize_SwtDelegate();
agi.core.AgCore_JNI.initialize();
agi.stkutil.AgStkutil_JNI.initialize();
agi.stkx.AgStkx_JNI.initialize();
//agi.stkobjects.AgStkobjects_JNI.initialize();
//agi.stkobjects.astrogator.AgStkgator_JNI.initialize();
//agi.stkobjects.aviator.AgStkobjectsAviator_JNI.initialize();
//agi.stkvgt.AgCrdn_JNI.initialize();
//agi.stkgraphics.AgStkGraphics_JNI.initialize();
agi.core.swt.AgSwt_JNI.initialize_SwtComponents();
this is the reverse order of the preceding initialize.
agi.core.awt.AgSwt_JNI.uninitialize_SwtComponents();
//agi.stkgraphics.AgStkGraphics_JNI.uninitialize();
//agi.stkvgt.AgCrdn_JNI.uninitialize();
//agi.stkobjects.aviator.AgStkobjectsAviator_JNI.uninitialize();
//agi.stkobjects.astrogator.AgStkgator_JNI.uninitialize();
//agi.stkobjects.AgStkobjects_JNI.uninitialize();
agi.stkx.AgStkx_JNI.uninitialize();
agi.stkutil.AgStkutil_JNI.uninitialize();
agi.core.AgCore_JNI.uninitialize();
agi.core.swt.AgSwt_JNI.uninitialize_SwtDelegate();