Hi Christian,
could it be that you've downloaded the regular EA build 146 rather than
the jigsaw EA build 146[1]?
The changes enabling the new "open" keyword is set to appear in the
regular EA builds starting from build 148 (from there on out I hope
there'll be less difference between the regular EA builds and the jigsaw
ones).
Thanks!
/Claes
[1] https://jdk9.java.net/jigsaw/
On 2016-12-06 12:34, Christian Frommeyer wrote:
Hi,
I heard a lot about jigsaw at Devoxx Belgium this year and got curious what is
in the new module system for us. I downloaded ea build 146 and started to
experiment. So far it was mostly straight forward. But now I'm struggeling to
get open modules (and packages) to work. I tried the syntax described here:
http://cr.openjdk.java.net/~mr/jigsaw/spec/lang-vm.html
This is also what was presented in various talks at Devoxx. However when trying
to compile the module-info file I get this error:
Compiling... src/moduleopen/module-info.java:1: error: class, interface, or
enum expected
open module moduleopen {
^
1 error
Unfortunately I wasn't able to find any documentation on a change in syntax. I
only found this:
http://openjdk.java.net/projects/jigsaw/doc/lang-vm.html
which seems to be a different version of the above. But I wasn't able to match
what might be the right alternative for open here. Perhaps someone can clarify
this and perhaps even help with some link to documentation on this.
Regards
Christian Frommeyer