Jigsaw Quick Start - question
Andrii Rodionov
andrii.rodionov at gmail.com
Sun Feb 5 01:50:00 PST 2012
Hello!
I am trying to implement an example from Jigsaw Quick Start
(http://openjdk.java.net/projects/jigsaw/doc/quickstart.html).
Modules were compiled and installed successfully. But when I try to
execute the com.greetings , I get an exception:
$ /opt/jdk/bin/java -L mlib -m com.greetings
Exception in thread "main" java.lang.NoClassDefFoundError: org/astro/World
at com.greetings.Hello.main(Hello.java:6)
Caused by: java.lang.ClassNotFoundException: org.astro.World :
requested by +com.greetings
at org.openjdk.jigsaw.Loader.loadClass(Loader.java:113)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
... 1 more
In Jigsaw Quick Start module-info.java is next:
$ cat src/modules/org.astro/module-info.java
module org.astro @ 1.2 {
}
After I’ve added line ‘exports org.astro’ to this module:
module org.astro @ 1.2 {
exports org.astro;
}
com.greetings run successfully.
May there be an error in example?
With best regards,
Andrii Rodionov
More information about the jigsaw-dev
mailing list