javap is not able to read the module-info.class if in a jar

Alan Bateman Alan.Bateman at oracle.com
Sun Dec 4 08:36:28 UTC 2016


On 04/12/2016 00:07, Remi Forax wrote:

> Hi all, hi Jon,
> while updating ASM6 to the new classfile format, i think i've found a bug in javap.
>
> javap as no trouble to read module-info.class if the class is specified directly
> $ /usr/jdk/jdk-9-jigsaw/bin/javap module-info.class
> open module com.google.guava {
>    requires java.base;
>    requires java.logging;
>    requires java.annotations.common;
>    requires jdk.unsupported;
>    exports com.google.common.io;
>    ...
> }
>
> but if the module-info.class is in a (modular) jar,
> /usr/jdk/jdk-9-jigsaw/bin/javap --module-path deps -m com.google.guava module-info
> Error: error while reading constant pool for module-info: invalid index #0
>
I've created JDK-8170708 to track this.

-Alan.


More information about the jigsaw-dev mailing list