Skip to content

Conversation

@marscher
Copy link
Member

@marscher marscher commented Sep 26, 2025

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.

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
Copy link

codecov bot commented Sep 26, 2025

Codecov Report

❌ Patch coverage is 81.96721% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.62%. Comparing base (f593880) to head (a57f7a2).

Files with missing lines Patch % Lines
native/common/jp_context.cpp 81.96% 7 Missing and 4 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@            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     
Files with missing lines Coverage Δ
native/common/include/jp_context.h 80.64% <ø> (ø)
native/common/jp_platform.cpp 73.33% <ø> (+6.66%) ⬆️
native/python/pyjp_module.cpp 81.64% <ø> (ø)
native/common/jp_context.cpp 75.75% <81.96%> (-0.81%) ⬇️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@marscher marscher requested a review from Thrameos September 30, 2025 15:49
}
jvm->DestroyJavaVM();

return nullptr;
Copy link
Member Author

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant