Skip to content

JLink support #760

Description

@bowbahdoe

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;
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions