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. 

regards,
Rémi

----- Mail original -----
> De: "Robert Scholte" <rfscho...@apache.org>
> À: jigsaw-dev@openjdk.java.net
> 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@9-ea/ModuleInfo.java:804)
> 
> 
> 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

Reply via email to