----- Mail original ----- > De: "Jonathan Gibbons" <jonathan.gibb...@oracle.com> > À: fo...@univ-mlv.fr, "jigsaw-dev" <jigsaw-dev@openjdk.java.net> > Envoyé: Mercredi 11 Mai 2016 22:03:09 > Objet: Re: module-info.java just causes problems
Hi Jon, > > > > On 05/11/2016 11:53 AM, fo...@univ-mlv.fr wrote: > > I also want to gather experience on the bytecode representation, > > BTW, the current format has a bug, encoding the name of a module as a part > > of the class name fell like a hack. It is a bad idea because the JVM Spec > > doesn't allow some characters in a class name, i think it should be > > encoded as a Utf8 (at the starts of the Module attribute), > > it's also weird because the name of the module-info.class is not > > "module-info" unlike any other classes, this will require to change more > > code than necessary in a lot of bytecode tools i know. > > package-info.class is a precedent. No, package-info.java is not stored at the root of a module but in the directory containing the class of the package, so if the source file is java/util/package-info.java, the class file is java/util/package-info.class and the name of the class inside the class file is java/util/package-info. for the module-info, the source file is module-info.java, the class file is module-info.class and the class inside the class file is whatever/is/the/name/of/my/module/module-info. > > -- Jon > Rémi