Skip to content
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

Generate JPMS compatible artifacts in addtion to the existing artifacts #1237

Merged

Conversation

matthiasblaesing
Copy link
Member

No description provided.

@matthiasblaesing
Copy link
Member Author

Prebuild binaries:
jna-jpms.zip

<exports package="com.sun.jna.win32" />
<exports package="com.sun.jna.internal" to="com.sun.jna.platform"/>
<requires module="java.logging" />
<requires module="java.desktop" />

Choose a reason for hiding this comment

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

BTW, does jna.jar actually require java.desktop module? Couldn't find which class(es) references it 🤔

Copy link
Contributor

Choose a reason for hiding this comment

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

Don't see anything in the main classes but there are a few test classes which load java.awt.* or Swing components.

Copy link
Member Author

Choose a reason for hiding this comment

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

com.sun.jna.Native:

import java.awt.Component;
import java.awt.GraphicsEnvironment;
import java.awt.HeadlessException;
import java.awt.Window;

Going back 10+ year I would vote to separate that out into its own package, regrettably I don't own a time machine :-)
If I remember correctly I had hoped, that we could get away with requires transitive, but it failed at load time, so the higher require requires was chosen. The primary intent of the artifacts is, that it is possible to use JNA on the module path, not more, not less.

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.

3 participants