> On Mar 8, 2018, at 5:47 PM, Bernd Eckenfels <e...@zusammenkunft.net> wrote: > > Hello, > > any experience with compiling a JAR with old Java and only adding the > module-info.jar with a new class Version? Would that allow to avoid the Need > for Multi-Release JARs? (of Course it makes a ugly toolchain).
Log4j 2 has a few classes that take advantage of Java 9 and the log4j-api jar has a module-info.java file in it. We had to create a separate module for those so they could compile with Java 9. We then copy them into the api jar before creating the jar. Yes, you could do that and not place the module-info.class file (or other classes compiled with Java 9) their “normal” locaions but then you would need some special way to detect that the classes are there to be able to take advantage of them. That all is workable. However, I am pretty sure you could not include such a jar as an OSGi module and there are various other tools that will fail when they encounter the unknown class version. Ralph --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org