Question on MVJAR usage

Paul Benedict pbenedict at apache.org
Tue Jul 19 15:28:23 UTC 2016


I have some questions. I believe core-lib is the right place. If not please
let me know.

1) Given a Java 9 runtime, is there any perceptible difference between a
non-multiversion jar, and a versioned jar which has placed all its classes
under /META-INF/versions/9 ? Pretend each jar has the same identical
binaries/resources.

2) Does the runtime care if the class version does not match what's under
/META-INF/versions/9? For example, what if I have targeted a Java 8 class
file format under versions/9?

3) Why does the new MVJAR JEP writeup [1] use versions/8 in the example? Is
it simply for illustration, but I don't see how that's a useful example
since it's an impossibility. There is no MVJAR support prior to Java 8 so
isn't a better (and realer) example be /9 and /10?

3) The same MVJAR JEP writeup doesn't clearly indicate what is considered a
"platform version". All the examples show a single digit, but I believe
Verona [2] has specificed the platform to include both major and minor
versions. For example, Verona says the minor version may include "revisions
to standard APIs mandated by a Maintenance Release of the relevant Platform
Specification". Because it mentions platform, it should be possible to do
/9, /9.0, and /9.1. Please advise?

4) Although MVJAR JEP writeup says "JAR metadata, such as that found in the
MANIFEST.MF file and the META-INF/services directory, need not be
versioned." The keyword here is "need not" which is not the same as "can
not" or "may not". So if it is needed, how does one version different
services for different platforms? Can there be /META-INF under the
appropriate versioned folder? Maybe /META-INF/versions/9/META-INF? I do not
see anything in the JEP that says it's supported or non-supported. Please
advise.

[1] http://openjdk.java.net/jeps/238
[2] http://openjdk.java.net/jeps/223

Cheers,
Paul


More information about the core-libs-dev mailing list