Visitar URL original
Generate JPMS compatible artifacts in addtion to the existing artifacts by matthiasblaesing · Pull Request #1237 · java-native-access/jna · GitHub
Skip to content

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

Merged
matthiasblaesing merged 1 commit into
java-native-access:masterfrom
matthiasblaesing:module-info
Aug 2, 2020
Merged

matthiasblaesing merged 1 commit into
java-native-access:masterfrom
matthiasblaesing:module-info

Conversation

@matthiasblaesing

Copy link
Copy Markdown
Member

No description provided.

@matthiasblaesing

Copy link
Copy Markdown
Member Author

Prebuild binaries:
jna-jpms.zip

Comment thread build.xml
<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" />

Copy link
Copy Markdown

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