orhelper is a module which aims to facilitate interacting and scripting with OpenRocket from Python.
- OpenRocket (tested with version 23.09)
- Java JDK 17. Possible sources include:
- Open JDK 17
- Oracle JDK 17
- Ubuntu:
sudo apt-get install openjdk-17-jre
- macOS (using Homebrew):
brew install openjdk@17
- Python >= 3.6
For most people jpype will be able to automatically find the JDK. However, if it fails or you want to be sure you are using the correct version, add the JDK path to a JAVA_HOME environment variable:
- Locate your JDK installation directory (e.g.
/usr/lib/jvm/[YOUR JDK 17 FOLDER HERE]
) - Open the
~/.bashrc
file with your favorite text editor (will likely need sudo privileges) - Add the following line to the
~/.bashrc
file:export JAVA_HOME="/usr/lib/jvm/[YOUR JDK 17 FOLDER HERE]"
- Restart your terminal or run the following for the changes to take effect:
source ~/.bashrc
- Set Windows environment variables to the following:
- Oracle
JAVA_HOME = C:\Program Files\Java\[YOUR JDK 17 FOLDER HERE]
- OpenJDK
JAVA_HOME = C:\Program Files\OpenJDK\[YOUR JDK 17 FOLDER HERE]
- Oracle
On macOS, JPype should be able to find the JDK automatically in most cases. If it doesn't, or if you want to ensure you're using a specific JDK version (JDK 17 in this case), you can set the JAVA_HOME environment variable manually to the path of your JDK installation:
-
Open the Terminal application.
-
Locate your JDK 17 installation directory. This is usually
/Library/Java/JavaVirtualMachines/[YOUR JDK 17 FOLDER HERE]/Contents/Home
. You can verify the path by running/usr/libexec/java_home -v 17
in Terminal, which should output the correct path to JDK 17 if it's installed. -
Set the JAVA_HOME environment variable by adding the following line to your shell profile file (
~/.bash_profile
for Bash or~/.zshrc
for Zsh, depending on your shell):export JAVA_HOME='/Library/Java/JavaVirtualMachines/[YOUR JDK 17 FOLDER HERE]/Contents/Home'
-
Apply the changes by running
source ~/.bash_profile
orsource ~/.zshrc
, depending on which file you edited. -
Verify the JAVA_HOME variable is set correctly by running
echo $JAVA_HOME
in Terminal. It should display the path to JDK 17.
This ensures that orhelper and other Java-dependent applications use the correct version of Java (JDK 17) on your macOS system.
-
Install orhelper from pip
pip install orhelper
-
Download the OpenRocket.jar file (if you don't already have it)
- Linux
Change<RELEASE>
to the OpenRocket version number you'd like to download, e.g.23.09
wget https://github.com/openrocket/openrocket/releases/download/release-<RELEASE>/OpenRocket-<RELEASE>.jar
- Linux
-
Set environment variable
CLASSPATH
path to OpenRocket.jar file. (Only required if it's not already at.\OpenRocket.jar
)CLASSPATH=\some\path\to\OpenRocket.jar
-
See
examples/
for usage examples -
See the OpenRocket wiki for more info on usage and the examples