Using the NoGraphics Mode
If your use case consists of using STK Engine as a computational tool and does not require 2D/3D visualization (for instance, if your application is running as a service on a compute node without direct user interaction), using the NoGraphics option results in faster load times and a lighter memory footprint. When that option is turned on, all 2D and 3D graphics support is skipped, and the code and libraries related to graphics do not get loaded into memory. This option must be set to true when running on hardware that does not have hardware or software support for OpenGL or X11 on Linux. It needs to be turned on during initialization and cannot be changed afterwards. The 2D, 3D and Graphics Analysis controls are obviously not available. To select this mode, set the NoGraphics property to true after creating the STK X application object and before performing any other operation with STK Engine:
Java:
To setup the JVM in headless mode you must set the java.awt.headless system property. You can do this by adding the following code to your application( NOTE: You can see this code utilized in the NoGraphics Java Code Sample ):
AgSTKXApplicationClass app = new AgSTKXApplicationClass();
app.setNoGraphics(true);
You can also set it through the command line:
java -Djava.awt.headless=true
STK Python API:
from agi.stk13.stkengine import STKEngine
stk = STKEngine.StartApplication(noGraphics=True)
The NoGraphics mode also alters the way scenarios are saved and loaded. When an engine application in NoGraphics mode loads a scenario coming from STK Desktop, the 2D and 3D information serialized as part of the scenario is ignored. If that scenario is then saved, all 2D and 3D information will be lost. If the scenario is then loaded into STK Desktop, default graphics options will be used.