On 14.12.2016 13:20, Rahul Muttineni wrote:
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.

In Groovy somebody made a script 2.groovy, which the Groovy compiler compiled to 2.class and the JVM then refused to verify. So I was wondering about the naming rules. Sure, I know about the basic rules of /;[... but why is 2 as name not allowed. The only possible reason I could find was that 2 is no valid identifier in Java, but that seemed to me to be a wrong rule, since the JLS sould not define the JVMS.

In that manner... tanks Remi for
see http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.2, but I don't see there why 2 is not allowed as class name... are am I blind?

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.

Reply via email to