Is there really a jdk.proxy1 module?

Stephane Epardaud stef at
Tue Dec 8 15:10:30 UTC 2015

On 08/12/15 16:07, Peter Levart wrote:
>> Except now I have to add a read to scan annotations of another module,
> Do you really have to addRead() ? Visibility of of classes
> (Class.forName()) should only depend on class loader delegation.
> Enumerating members, when you already have a java.lang.Class object
> likewise. Looking-up annotations likewise.
> What exactly are you trying to do and what exception do you get?

I have a scanner that can scan annotations of type X (by name) and
member Y (by name) so it must use reflection to load the annotation and
member. I got that when accessing the annotation's member Method:

java.lang.IllegalAccessException: class
(in module com.redhat.ceylon.model) cannot access interface (in module
ceylon.language) because module ceylon.language does not export package to module com.redhat.ceylon.model
sun.reflect.Reflection.throwIllegalAccessException(java.base at 9.0/
sun.reflect.Reflection.ensureMemberAccess(java.base at 9.0/
java.lang.reflect.AccessibleObject.slowCheckMemberAccess(java.base at 9.0/
java.lang.reflect.AccessibleObject.checkAccess(java.base at 9.0/
    at java.lang.reflect.Method.invoke(java.base at 9.0/

> Cycles are checked only when constructing a Layer. Later, they are not
> any more. The problem with cycles is mainly in compile-time as I
> understand.

Well, they're not really a problem at all at compile-time, not any more
than Class cycles are a problem, in the sense that the workaround is
simple: compile them at the same time. But OK, at least I can solve my
issue by introducing cycles at runtime.

More information about the jigsaw-dev mailing list