[ 
https://issues.apache.org/jira/browse/NETBEANS-5500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17347791#comment-17347791
 ] 

Rangi Keen commented on NETBEANS-5500:
--------------------------------------

JDK 16 will throw a runtime exception and JDK 17 will no longer allow this 
reflective access. See [A peek into Java 17: Continuing the drive to 
encapsulate the Java runtime 
internals|https://blogs.oracle.com/javamagazine/java-runtime-encapsulation-internals#anchor_7]
 for details.

> URLStreamFactory registration violates JDK9+ reflection restrictions
> --------------------------------------------------------------------
>
>                 Key: NETBEANS-5500
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-5500
>             Project: NetBeans
>          Issue Type: Bug
>          Components: platform - Module System
>    Affects Versions: 9.0
>            Reporter: Jaroslav Tulach
>            Assignee: Svatopluk Dedic
>            Priority: Major
>              Labels: VSNetBeans
>             Fix For: Next
>
>
> If you run NetBeans on JDK9+ you'll see:
> {code:java}
> WARNING: An illegal reflective access operation has occurred
> WARNING: Illegal reflective access by 
> org.netbeans.ProxyURLStreamHandlerFactory 
> (file:/netbeans/nbbuild/netbeans/platform/lib/boot.jar) to field 
> java.net.URL.handler
> WARNING: Please consider reporting this to the maintainers of 
> org.netbeans.ProxyURLStreamHandlerFactory
> WARNING: Use --illegal-access=warn to enable warnings of further illegal 
> reflective access operations
> WARNING: All illegal access operations will be denied in a future release 
> {code}
> There is a new API that one can use to register (most of) the factories on 
> JDK9+: 
> [https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/net/spi/URLStreamHandlerProvider.html]
>  
> We should use it as once the JDK is going to ban the illegal access 
> operations and then it is better to be ready.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to