OpenRocket - Run from CLI and/or Java

The Rocketry Forum

Help Support The Rocketry Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

John D

New Member
Feb 18, 2019
Reaction score
Hi there,

I wonder if it is possible to run a simulation in OpenRocket without the need of the GUI or the need of interact with the GUI. I am aware of simulation listeners, but these require some interaction with user interface. In brief, I want to run a simulation and get its results without interaction via mouse and integrate it as part of another software piece.

Thanks in advance!
There is some info on the wiki for scripting:

It seems old and I never got it to work well.

What language is your project in? If you can use java, you can import the open rocket jar as a library and have full access to everything. The source is on github if you need a reference to what’s what:

This let me do everything the way I wanted to.

Good luck!

Hi, @gtg738w .

Have you been able to write a code that starts the software, loads a project and runs the simulation?
If so, could you give me at least the minimum idea of the code? What methods have you used to make everything happen and get the results?

I really appreciate any help you can provide.

-Yuri Achermann
Sure, I was able to do the following:

Point to the file and load the model-
    orkFile = new File("filename.ork");
    OpenRocketDocument doc = null;
    GeneralRocketLoader loader = new GeneralRocketLoader(orkFile);

    try {
        doc = loader.load();
    } catch (Exception ex) {

The you can change any aspect of it and run the simulation-

    try {
    } catch (SimulationException e) {

Then you can access the data from the sim-

Hope that helps
Hi guys,
has anyone done progress with this kind of work?
With the example by @gtg738w i´m always getting Nullpointerexeptions and i'm unable to load on the doc variable.
I'm not really deep into Java so if someone have this kind of functional code for OpenRocket it would really really help me :)

Latest posts