externalsortinginjava icon indicating copy to clipboard operation
externalsortinginjava copied to clipboard

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

Open joehei opened this issue 5 years ago • 4 comments

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

joehei avatar Mar 22 '19 14:03 joehei

Could you contribute a PR?

lemire avatar Mar 22 '19 15:03 lemire

done :-)

joehei avatar Mar 24 '19 09:03 joehei

@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?

lemire avatar Mar 25 '19 14:03 lemire

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.

tkslaw avatar Oct 07 '23 08:10 tkslaw