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

JLink support #760

Closed
bowbahdoe opened this issue Aug 16, 2023 · 3 comments
Closed

JLink support #760

bowbahdoe opened this issue Aug 16, 2023 · 3 comments

Comments

@bowbahdoe
Copy link
Contributor

bowbahdoe commented Aug 16, 2023

This is effectively a duplicate of #513

Because this does not have a module-info.java in the packaged release, it cannot be used with jlink without manual configuration

$ jlink --module-path json-20230618.jar --add-modules ALL-MODULE-PATH --output out
Error: automatic module cannot be used with jlink: org.json from file:///Users/emccue/Downloads/json-20230618.jar

This, in turn, means every downstream library cannot be used with jlink without manual configuration. So if I am using redis and want to use Jedis I need to manually figure out what modules that requires.

I can't ask Jedis to fix that until their dependencies fix it, ... its a PITA.

The commands to make this work are relatively straight forward, so it should just be a matter of configuring maven and gradle + updating the wiki. (I know how to do it for maven, not gradle). It will mean that people who want to build from source would need java 9, but consumers won't.

Given this is one of the most popular libraries and is often deep in a dependency tree, its a one of many needed steps if the ecosystem writ. large is ever going to adopt modules more widely.

module org.json {
    exports org.json;
}
@stleary
Copy link
Owner

stleary commented Aug 16, 2023

Can you submit a pull request to implement the change, and include in the PR description exactly how this will impact users who are not on Java 9 yet?

@bowbahdoe
Copy link
Contributor Author

Sure #761

@stleary
Copy link
Owner

stleary commented Sep 3, 2023

Closing due to code was merged.

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

No branches or pull requests

2 participants