On 3/24/2017 20:33, Ceki Gülcü wrote:


On 3/24/2017 19:28, David M. Lloyd wrote:

Hi Ceki, we came up with an approach that works for us (though it's a
bit cumbersome).  See: http://word-bits.flurg.com/multrelease-jars/


To be more precise, I am trying to have a single jar file which will
be seen as modular on Java 9 and as a regular jar in older JVMs,
with module-info.class ignored.

Quoting from [1]:

  A modular JAR file can be used as a module, in which case its
  module-info.class file is taken to contain the module’s
  declaration. It can, alternatively, be placed on the ordinary class
  path, in which case its module-info.class file is ignored. Modular JAR
  files allow the maintainer of a library to ship a single artifact that
  works both as a module, on Java SE 9 and later, and as a regular JAR
  file on the class path, on all releases. We expect that
  implementations of Java SE 9 which include a jar tool will enhance
  that tool to make it easy to create modular JAR files.

This is the problem I am struggling with.

--
Ceki

[1] http://openjdk.java.net/projects/jigsaw/spec/sotms/

Reply via email to