Description | API | Development Configuration | Deployment Configuration | FAQ
Typically this approach is used when you want to utilize STK's analysis engine but do not want to embed its visualization within your application. As opposed to the pre-existing Connect Command and TCP/IP automation, this automation approach provides an Object Oriented API through remote proxy inter-process communications between your Java application process and the STK GUI Application process.
Note: This type of application is only supported on Windows Operating Systems.
JAR libraries:
JNI native libraries:
Packages:
Documentation
STK Automation 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:
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 Automation 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 instructions for a STK Automation Application.
Platform | Path |
Windows 32bit | C:\Program Files\AGI\STK 11\bin\JavaDevKit |
Windows 64bit | C:\Program Files\AGI\STK 11\bin\JavaDevKit |
Windows 32bit on 64bit | C:\Program Files (x86)\AGI\STK 11\bin\JavaDevKit |
A set of frequently asked questions/issues and their answers/solutions.
In the Java API, event proxies are created automatically upon creation of AgStkObjectRoot and other objects. As a result, even though the client application does not register for events, all event notifications are being forwarded to the Java process. This marshaling between the STK process and the automation application process causes undesirable slowdown in response in the STK application, especially during animation.
To address this issue, the NotificationFilter property has been exposed on IAgStkObjectRoot interface. This allows users to filter which automation events shall be raised. The notification filtering is applied to all root objects in the application, except for roots that have been isolated. For isolated roots, the event notification must be configured individually.
Using the NotificationFilter can significantly improve the performance and responsiveness of your Automation Application. It must be noted, however, that use of the eNotificationFilterMaskAnimationEvents flag may negatively affect performance.
Example code can be found in <STK install dir>\CodeSamples\CustomApplications\Java\Swing_STK\src\agi\customapplications\swing\EventsFilterJPanel.java.
Typically, console applications do not utilize GUI functionality as are provided by frameworks such as AWT and SWT. However, at this time the AGI 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 AGI 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.
agi.core.awt.AgAwt_JNI.initialize_AwtDelegate();
agi.stk.ui.AgStkAutomation_JNI.initialize(true);
agi.core.awt.AgAwt_JNI.initialize_AwtComponents();
Note: This is the reverse order of the preceding initialize.
agi.core.awt.AgAwt_JNI.uninitialize_AwtComponents();
agi.stk.ui.AgStkAutomation_JNI.uninitialize();
agi.core.awt.AgAwt_JNI.uninitialize_AwtDelegate();
agi.core.awt.AgAwt_JNI.initialize_AwtDelegate();
agi.stk.ui.AgStkAutomation_JNI.initialize(true);
agi.core.awt.AgAwt_JNI.initialize_AwtComponents();
Note: This is the reverse order of the preceding initialize.
agi.core.awt.AgAwt_JNI.uninitialize_AwtComponents();
agi.stk.ui.AgStkAutomation_JNI.uninitialize();
agi.core.awt.AgAwt_JNI.uninitialize_AwtDelegate();
agi.core.swt.AgSwt_JNI.initialize_SwtDelegate();
agi.stk.ui.AgStkAutomation_JNI.initialize(true);
agi.core.swt.AgSwt_JNI.initialize_SwtComponents();
Note: This is the reverse order of the preceding initialize.
agi.core.swt.AgSwt_JNI.uninitialize_SwtComponents();
agi.stk.ui.AgStkAutomation_JNI.uninitialize();
agi.core.swt.AgSwt_JNI.uninitialize_SwtDelegate();
Initializing/Uninitializing with the following techniques will
allow you to exclude the agi.stkobjects.astrogator.jar
and AgJNIStkGator.dll/libagjnistkgator.so
from your
configuration settings.
agi.core.awt.AgAwt_JNI.initialize_AwtDelegate();
agi.core.AgCore_JNI.initialize();
agi.stkutil.AgStkutil_JNI.initialize();
agi.stkobjects.AgStkobjects_JNI.initialize();
//agi.stkobjects.astrogator.AgStkgator_JNI.initialize();
agi.stkvgt.AgCrdn_JNI.initialize();
agi.stkgraphics.AgStkGraphics_JNI.initialize();
agi.stk.ui.core.AgUiCore_JNI.initialize();
agi.stk.ui.application.AgUiApplication_JNI.initialize();
agi.core.awt.AgAwt_JNI.initialize_AwtComponents();
Note: This is the reverse order of the preceding initialize.
agi.core.awt.AgAwt_JNI.uninitialize_AwtComponents();
agi.stk.ui.application.AgUiApplication_JNI.uninitialize();
agi.stk.ui.core.AgUiCore_JNI.uninitialize();
agi.stkgraphics.AgStkGraphics_JNI.uninitialize();
agi.stkvgt.AgCrdn_JNI.uninitialize();
//agi.stkobjects.astrogator.AgStkgator_JNI.uninitialize();
agi.stkobjects.AgStkobjects_JNI.uninitialize();
agi.stkutil.AgStkutil_JNI.uninitialize();
agi.core.AgCore_JNI.uninitialize();
agi.core.awt.AgAwt_JNI.uninitialize_AwtDelegate();
Initializing/Uninitializing with the following techniques will
allow you to exclude the agi.stkvgt.jar
and
AgJNIStkVGT.dll/libagjnistkvgt.so
from your configuration settings.
agi.core.awt.AgAwt_JNI.initialize_AwtDelegate();
agi.core.AgCore_JNI.initialize();
agi.stkutil.AgStkutil_JNI.initialize();
agi.stkobjects.AgStkobjects_JNI.initialize();
agi.stkobjects.astrogator.AgStkgator_JNI.initialize();
//agi.stkvgt.AgCrdn_JNI.initialize();
agi.stkgraphics.AgStkGraphics_JNI.initialize();
agi.stk.ui.core.AgUiCore_JNI.initialize();
agi.stk.ui.application.AgUiApplication_JNI.initialize();
agi.core.awt.AgAwt_JNI.initialize_AwtComponents();
Note: This is the reverse order of the preceding initialize.
agi.core.awt.AgAwt_JNI.uninitialize_AwtComponents();
agi.stk.ui.application.AgUiApplication_JNI.uninitialize();
agi.stk.ui.core.AgUiCore_JNI.uninitialize();
agi.stkgraphics.AgStkGraphics_JNI.uninitialize();
//agi.stkvgt.AgCrdn_JNI.uninitialize();
agi.stkobjects.astrogator.AgStkgator_JNI.uninitialize();
agi.stkobjects.AgStkobjects_JNI.uninitialize();
agi.stkutil.AgStkutil_JNI.uninitialize();
agi.core.AgCore_JNI.uninitialize();
agi.core.awt.AgAwt_JNI.uninitialize_AwtDelegate();
STK Programming Interface 11.0.1