On 02/12/2015 11:01, Stephane Epardaud wrote:
Just tried it and got:

Exception in thread "main" java.lang.ClassFormatError: Illegal class
name "com.ceylon.java9.Test" in class file module-info
     at java.lang.ClassLoader.defineClass1([email protected]/Native Method)
     at java.lang.ClassLoader.defineClass([email protected]/ClassLoader.java:854)
     at
java.security.SecureClassLoader.defineClass([email protected]/SecureClassLoader.java:152)
     at
java.net.URLClassLoader.defineClass([email protected]/URLClassLoader.java:462)
     at
java.net.URLClassLoader.access$100([email protected]/URLClassLoader.java:75)
     at java.net.URLClassLoader$1.run([email protected]/URLClassLoader.java:370)
     at java.net.URLClassLoader$1.run([email protected]/URLClassLoader.java:364)
     at java.security.AccessController.doPrivileged([email protected]/Native
Method)
     at
java.net.URLClassLoader.findClass([email protected]/URLClassLoader.java:363)
     at java.lang.ClassLoader.loadClass([email protected]/ClassLoader.java:440)
     at java.lang.ClassLoader.loadClass([email protected]/ClassLoader.java:373)

I know it works for package-info.class files, but is it supposed to work
with module-info.class files too? Or is it just not implemented yet?

The this_class should be <internal-name>/module-info but in any case, this isn't the way to "define" a module to the run-time. Instead modules are defined in layers, with Layer.create the method to create a Layer.

-Alan.

Reply via email to