Discover modulename

Remi Forax forax at
Thu Aug 25 10:45:04 UTC 2016

Hi Robert,
there are currently two different module descriptor formats,
the old one, that is readable by current JDK9 and the new one that is readable by the JDK9-jigsaw,
and they are not compatible.

If you want to read the module descriptor of asm6-alpha, you need to use the jar from the JDK9 and not the JDK9-jigsaw.

Obviouly, at some point, the new format will replace the old one, and we will release a new version of ASM6 compatible with the new format.

I suppose it's time for me to at least update the trunk (yes, ASM still use SVN :( ) of ASM6 to be compatible with the new format,
i've tried to not do that because i'm still not satisfied by the way the binary format (old or new) encodes the name of the current module. 


----- Mail original -----
> De: "Robert Scholte" <rfscholte at>
> À: jigsaw-dev at
> Envoyé: Jeudi 25 Août 2016 12:26:48
> Objet: Discover modulename

> Hi,
> In an old thread I asked this before and got the following answer:
> "One way is `jar --file foo.jar -p`. That will print the module descriptor
> when the JAR file is a modular JAR. There is API support for reading the
> binary form of the module declaration too."
> With the renaming of the arguments I assume it is now:
> jar --file foo.jar --print-module-descriptor
> However, this gives me an exception on the asm-6.0_ALPHA.jar
> d:\jdk-9\bin\jar --file asm-6.0_ALPHA.jar --print-module-descriptor
> java.lang.module.InvalidModuleDescriptorException: Index into constant
> pool out of range
>         at
> java.lang.module.ModuleInfo.invalidModuleDescriptor(java.base at 9-ea/
> How about jars without module descriptor? Is there a commandline option to
> discover what the name of an automodule will be? I could guess the name,
> but I'd prefer to show the calculated name.
> thanks,
> Robert

More information about the jigsaw-dev mailing list