Skip to content

Document changes required for running JNA on JDK24+#1669

Merged
matthiasblaesing merged 2 commits into
java-native-access:masterfrom
matthiasblaesing:document-jdk24
Apr 26, 2025
Merged

Document changes required for running JNA on JDK24+#1669
matthiasblaesing merged 2 commits into
java-native-access:masterfrom
matthiasblaesing:document-jdk24

Conversation

@matthiasblaesing

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

@basil basil left a comment

Copy link
Copy Markdown

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.

Comment thread src/com/sun/jna/overview.html Outdated
Comment thread src/com/sun/jna/overview.html Outdated
@dbwiddis

dbwiddis commented Apr 25, 2025

Copy link
Copy Markdown
Contributor

Should downstream repos document something similar?

@basil

basil commented Apr 25, 2025

Copy link
Copy Markdown

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
Copy Markdown
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
@matthiasblaesing
matthiasblaesing deleted the document-jdk24 branch September 30, 2025 18:00
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