Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-5500

URLStreamFactory registration violates JDK9+ reflection restrictions

    XMLWordPrintableJSON

Details

    Description

      If you run NetBeans on JDK9+ you'll see:

      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 

      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.

      Attachments

        Issue Links

          Activity

            People

              sdedic Svatopluk Dedic
              jtulach Jaroslav Tulach
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: