Hi Jochen, The JVM specification allows pretty much anything that can be encoded in Modified-UTF8. If you want to run your generated classes directly on the JVM, pretty much any name will do. But if you want the classes that you are generating to be importable from Java via javac, you need to follow the JLS.
For what purpose are you wondering about the naming? We might be able to help you better if you tell us. Hope that helps! Rahul On Tuesday, December 13, 2016 at 11:52:42 PM UTC+5:30, blackdrag wrote: > > Hi all, > > I am looking, but somehow not finding, a complete description of how a > classname of a current class has to be according to the JVM. I am asking > especially because I met a case in which the 2 was tried as class name > and the verification of the class failed (1.8 update 65). And since > something like Foo2 is a valid name I strongly assume 2 is basically a > valid character. Now 2 is not a valid java identifier and such, but does > the class name really have to follow the JLS rules here? > > Anyone able to help me with some references in the spec that explain this? > > bye Jochen > -- You received this message because you are subscribed to the Google Groups "JVM Languages" group. To unsubscribe from this group and stop receiving emails from it, send an email to jvm-languages+unsubscr...@googlegroups.com. To post to this group, send email to jvm-languages@googlegroups.com. Visit this group at https://groups.google.com/group/jvm-languages. For more options, visit https://groups.google.com/d/optout.