Error message when accessing non-public type

Gunnar Morling gunnar at hibernate.org
Wed Jun 15 10:24:36 UTC 2016


Hi,

When referring to a not-exported type from another module, I'm getting this
rather generic compilation error:

    package someprivate.pakkage does not exist
import someprivate.pakkage.SomeType;
                                              ^
    error: cannot find symbol SomeType

As if the type was not existing at all. As per this blog post [1], a more
specific error used to be raised in previous EA builds:

    error: SomeType is not visible because
    package someprivate.pakkage is not visible

I found that previous error more helpful, as it gives an indication of what
to do in order to prevent it. Has this been changed intentionally? Or am I
doing something wrong here?

Thanks,

--Gunnar

[1]
https://blog.codecentric.de/en/2015/11/first-steps-with-java9-jigsaw-part-1/


More information about the jigsaw-dev mailing list