Is there really a jdk.proxy1 module?

Sundararajan Athijegannathan sundararajan.athijegannathan at oracle.com
Tue Dec 8 14:52:03 UTC 2015


addRead -> addReads

-Sundar

On 12/8/2015 8:20 PM, Sundararajan Athijegannathan wrote:
> Because jdk.proxy1 is a dynamically created module, you've to 
> programmatically add read using java.lang.reflect.Module (addRead 
> method) API.
>
> -Sundar
>
> On 12/8/2015 8:11 PM, Stephane Epardaud wrote:
>> Except I can't add reads to it:
>>
>> $HOME/no-backup/src/jdk1.9.0-jigsaw/bin/java
>> -XaddReads:jdk.proxy1=com.redhat.ceylon.model ...
>> Error occurred during initialization of VM
>> java.lang.RuntimeException: Unknown module: jdk.proxy1
>>      at
>> jdk.internal.module.ModuleBootstrap.fail(java.base at 9.0/ModuleBootstrap.java:394) 
>>
>>      at
>> jdk.internal.module.ModuleBootstrap.addMoreReads(java.base at 9.0/ModuleBootstrap.java:319) 
>>
>>      at
>> jdk.internal.module.ModuleBootstrap.boot(java.base at 9.0/ModuleBootstrap.java:229) 
>>
>>      at java.lang.System.initPhase2(java.base at 9.0/System.java:1263)
>>
>> That must be a mistake though, otherwise I can't use reflection to read
>> annotations…
>>
>> On 08/12/15 15:32, Remi Forax wrote:
>>> No,
>>> jdk.proxy1 is a module created dynamically by the class 
>>> java.lang.reflect.Proxy.
>>>
>>> Rémi
>>>
>>> ----- Mail original -----
>>>> De: "Stephane Epardaud" <stef at epardaud.fr>
>>>> À: jigsaw-dev at openjdk.java.net
>>>> Envoyé: Mardi 8 Décembre 2015 15:21:57
>>>> Objet: Is there really a jdk.proxy1 module?
>>>>
>>>> I'm getting:
>>>>
>>>> java.lang.IllegalAccessException: class
>>>> com.redhat.ceylon.model.loader.impl.reflect.mirror.ReflectionAnnotation 
>>>>
>>>> (in module com.redhat.ceylon.model) cannot access class
>>>> com.sun.proxy.jdk.proxy1.$Proxy3 (in module jdk.proxy1) because module
>>>> com.redhat.ceylon.model does not read module jdk.proxy1
>>>>
>>>> When using reflection to load annotations. Is there really a
>>>> "jdk.proxy1" module I need to import when doing reflection? Sounds
>>>> fishy, no?
>>>>
>>>> Cheers.
>>>>
>



More information about the jigsaw-dev mailing list