Automatic module names
Alan Bateman
Alan.Bateman at oracle.com
Thu Mar 10 07:58:15 UTC 2016
On 09/03/2016 22:15, Paul Benedict wrote:
> :
>
> 1) Wants to assign an official module name when used in the modulepath
> (forward looking requirement)
> 2) Doesn't want to make JDK 9 a minimum version (thus no module-info.class)
>
Keep in mind that a compiled module-info can be added to a JAR file
where the code is otherwise compiled for an older release. If you are
willing to tolerate a newer JDK in your build environment then you can
compile that code with `javac -release N`(see JEP 247 [1]). This means
one JDK in your build environment with the build creating a JAR file
that you can deploy on the class path with JDK N or newer, or as an
explicit module with JDK 9 or newer. It is of course a more complicated
build but something that a "forward looking" developer could do.
-Alan
[1] http://openjdk.java.net/jeps/247
More information about the jigsaw-dev
mailing list