Integrating Java Propagator into Orekit Python Wrapper

Hi Orekit Community,

I hope this message finds you well.

I am working on an Orekit Python project and need to use a custom Java propagator. I have a Java package called propagator, which includes a class J2Model that performs specific propagation tasks. Now, I need to integrate this Java class into my Orekit Python environment, enabling me to utilize J2Model directly from Python.

However, I am unsure how to properly integrate the J2Model class from my Java package into the Orekit Python wrapper.

Any help or pointers to relevant documentation or examples would be greatly appreciated.



Not sure to understand what you mean. The wrapper exposes the Orekit abstract classes so you can implement them in Python and they will work. If you have Java code, you cannot use it as is with the ‘official’ wrapper. However recently @petrus.hyvonen publicised an alternative way to use Orekit in Python. I’ve not tried it yet, but in my understanding it is easier to create a jar and call it with this system.


Hi Adria,

Indeed if you already have a java custom code base such as a own propagator, the most straightforward way would be to use the alternative wrapper as pointed out by Romain. An example is at GitHub - petrushy/jpype_java_extension_example

Alternatives are to rewrite it in Python (will be slower) or to take the orekit-feedstock conda build package and make modifications to that to include your jar there. But it is a more tricky approach.


1 Like