Skip to content

Document changes required for running JNA on JDK24+ #1669

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

Merged

Conversation

matthiasblaesing
Copy link
Member

Closes: #1665

This enables running JNA from the module path like this:

java -p <path_to_jna> -m com.sun.jna

That is the modular equivalent to:

java -jar <path_to_jna>
Copy link

@basil basil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much! Now I can ensure Jenkins complies in a way that is officially approved and will match how other users adapt to this change.

@dbwiddis
Copy link
Contributor

dbwiddis commented Apr 25, 2025

Should downstream repos document something similar?

@basil
Copy link

basil commented Apr 25, 2025

I don't feel strongly one way or another. The JVM warning was directly emanating from com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath, so I feel that documentation in this repository is sufficient.

@matthiasblaesing
Copy link
Member Author

@basil thanks for the suggested changes. I added them in place.
@dbwiddis a heads up might be helpful for users. They might not be aware, that $library uses JNA.

@matthiasblaesing matthiasblaesing merged commit 45c4476 into java-native-access:master Apr 26, 2025
12 checks passed
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.

Warning about use of JNI in JDK 24
3 participants