Orekit Python Wrapper(s) 13.1 Released

Hi,

The Orekit v13.1 python packages (JCC versino and orekit_jpype) has now been released, with all the fixes and new features available at: Orekit 13.1 released . Many thanks for the efforts put into this release!

This also includes the release 4.0 release version of Rugged [VOTE] Releasing Rugged 4.0 from release candidate 1

On the wrapping side, there are not much changes, a few fixes and notes:

For new projects I do recommend the orekit_jpype version which is much thinner, less opinionated, installs with pip and if continues to work well will be the version for the future. Also important, thanks to @yzokras we have more maintainers for this version :slight_smile:

7 Likes

Thanks a bunch to Clement and you for the swift release!

1 Like

Hi guys,

I upgraded one of my project to 13.1, but I had to downgrade manually jpype to 1.5.0 otherwise I get those when launching the JVM:

Process finished with exit code -1073741819 (0xC0000005)

I’m on Windows with Python 3.11.

Cheers,
Romain.

1 Like

Hm.. which java version are you on, note that 1.6.0 is not compatible with java below 11?

You mean I should change my env variable JAVA_HOME or something?

I’ve not modified anything besides upgrading/downgrading dependencies via pip

Yes, it could be needed to upgrade the java version if it is using jvm 1.8 (java version 8) to 11 or higher. The 8 version was supported in 1.5.X version of jpype but not from 1.6.0 and future, see Runtime error when moving from 1.5.2 to 1.6.0 · Issue #1312 · jpype-project/jpype · GitHub

You could probably change this by changing JAVA_HOME to point to a JDK with version 11 or higher.

In [3]: import jpype

In [4]: jpype.getJVMVersion()
Out[4]: (11, 0, 27)

In [5]: jpype.__version__
Out[5]: '1.6.0'

We may add a test to runtime check that the java version is high enough. Check java version compatibility at runtime. (!36) · Merge requests · Orekit / orekit_jpype · GitLab

Version 13.1.0.1 on pypi is now released, it contains a check for incompatible java version (<11) if jpype 1.6.0 or higher is used.

2 Likes

I tried changing my JAVA_HOME to Jdk 11 to no avail, I’m still getting the error

Can you provide your code as well as a backtrace?

I am wondering if we should also test orekit jpype for Windows in the gitlab CI, but jpype already has a CI pipeline for multiple OSes and JDK versions, including Windows and JDK11: jpype/.azure/build.yml at master · jpype-project/jpype · GitHub

There’s not much code. I’m calling init on the JVM from an “_init_” python file. I’m using venv. It works fine with jpype 1.5.X.
The only message I get is the one I posted with an exit code

Maybe the JAVA_HOME is not read?

@Serrof could you check if it crashes with just jpype, just starting the JVM directy from jpype: JPype User Guide — JPype 1.6.1.dev0 documentation

So my JAVA_HOME points to JDK11, and the env. var. is correct when read with os
If I do this with jpypte 1.5.2:
print(jpype.getDefaultJVMPath())
I get 11 too

However, when I do “java -version” in the terminal from venv, it says it’s JDK 8…

Any ideas how to solve this?

Edit: turns out just importing jpype 1.6.0 gets me the exit code

Cheers,
Romain.

Hi @Serrof ,

Not sure what this could be, you likely have several installations of java but that shouldn’t be a problem I think (your PATH points to one and the JAVA_HOME to another version), but cannot be excluded. You could try to set JDK 11 as your default windows JDK but risk that may give issues with some other program ( switch between multiple java versions | Medium )

There is a risk that this is related to previous windows issue with jpype, but that should be in jpype tests. It should fine using the 1.5.2 jpype version but would limit you to python <3.13 and missing some bug fixes.