[jp_context] added additional code path to treat condition of Java8#1318
Open
marscher wants to merge 35 commits intojpype-project:masterfrom
Open
[jp_context] added additional code path to treat condition of Java8#1318marscher wants to merge 35 commits intojpype-project:masterfrom
marscher wants to merge 35 commits intojpype-project:masterfrom
Conversation
We require now JNI_VERSION 9 := Java 9 to enforce the usage of at least Java9. If we fail to create the JVM with this requirement, we provide a user understandable error message.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1318 +/- ##
==========================================
- Coverage 86.66% 86.62% -0.04%
==========================================
Files 112 112
Lines 10264 10303 +39
Branches 4026 4046 +20
==========================================
+ Hits 8895 8925 +30
- Misses 762 768 +6
- Partials 607 610 +3
🚀 New features to boost your workflow:
|
marscher
commented
Oct 6, 2025
| } | ||
| jvm->DestroyJavaVM(); | ||
|
|
||
| return nullptr; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We require now JNI_VERSION 9 := Java 9 to enforce the usage of at least Java9. If we fail to create the JVM with this requirement, we provide a user understandable error message.
I've tested it locally building Jpype with Java25 and then run it with Java8 to trigger the error message.
Also added a test case for it. This required to change the ci pipeline at little bit. We are now able to pass additional arguments to pytest via new parameter.
I've also added a simple function to obtain the JVM version for a given JVM library path. However due to restrictions of JNI, we need to ensure this method is only called from a distinct process, e.g. starting multiple JVM instances is not allowed.