Skip to content

Please add a module-info.java in order to make it a module. #16

Open

Description

@joehei

Please add a module-info.java in order to make it a module.

Activity

  1. lemire commented on Mar 22, 2019

    @lemire
    Owner

    Could you contribute a PR?

  2. joehei commented on Mar 24, 2019

    @joehei
    Author

    done :-)

  3. lemire commented on Mar 25, 2019

    @lemire
    Owner

    @joehei Thanks for the PR. It seems to break our tests... Presumably the issue is that it breaks backward compatibility with Java 8.

    Many users are going to stick with Java 8. It seems unwise to break compatibility with Java 8. Is there a way around this?

  4. tkslaw commented on Oct 7, 2023

    @tkslaw

    I believe the standard approach is to compile everything targeting Java 8, except for the module-info.java file, which should be compiled targeting Java 9+. Then package all the class files in a JAR and publish it.

    If the library is used on Java 9+ and placed on the module-path, then the module-info file is used. Otherwise, if the code is placed on the class-path, or is used on Java 8, then the module-info file is ignored.

    Note this is not the same thing as the multi-release JAR feature.

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