-
Notifications
You must be signed in to change notification settings - Fork 200
[jp_context] added additional code path to treat condition of Java8 #1318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
marscher
wants to merge
35
commits into
jpype-project:master
Choose a base branch
from
marscher:enforce_java9_during_jvm_creation
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[jp_context] added additional code path to treat condition of Java8 #1318
marscher
wants to merge
35
commits into
jpype-project:master
from
marscher:enforce_java9_during_jvm_creation
Conversation
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
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; |
Member
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
None would be better.
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.