"OpenJDK specific" attribute specifications
Alan Bateman
Alan.Bateman at oracle.com
Fri Feb 10 12:04:14 UTC 2017
On 10/02/2017 07:24, Ess Kay wrote:
> Thanks Alan. I am not 100% sure what you mean when you say that the
> ModuleHashes and ModuleResolution attributes are "JDK-specific". Are
> you saying that they may appear in Java 9 class files but it is
> assumed that they will only be used only by Java compilers as opposed
> to the JVM?
You won't find the attributes defined in the JVMS and so no guarantee
that other implementations of Java SE will support them.
As regards whether you will encounter class files with these attributes
then you might. The `jar` tool supports an option to record the hashes
of modules. It's less likely that you will encounter the
ModuleResolution attribute but the the `jar` tool does have the
`--warn-if-resolved` option that adds this attribute for modules that
are incubating or on death row. More on this in JEP 11 [1].
-Alan
[1] http://openjdk.java.net/jeps/11
More information about the jigsaw-dev
mailing list