juanotto opened a new pull request, #20:
URL: 
https://github.com/apache/netbeans-mavenutils-archetype-netbeans-platform-app-archetype/pull/20

   The archetype has jpms flag to build with 
`--add-opens=java.base/java.net=ALL-UNNAMED` but running the application throws 
an exception at startup for not being able to access `java.base`
   
   ```
   SEVERE: No way to find original stream handler for jar protocol
   java.lang.reflect.InaccessibleObjectException: Unable to make field 
transient java.net.URLStreamHandler java.net.URL.handler accessible: module 
java.base does not "opens java.net" to unnamed module @3b07d329
        at 
java.base/java.lang.reflect.AccessibleObject.throwInaccessibleObjectException(AccessibleObject.java:353)
        at 
java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:329)
        at 
java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:277)
        at 
java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:179)
        at java.base/java.lang.reflect.Field.setAccessible(Field.java:173)
        at 
org.netbeans.ProxyURLStreamHandlerFactory.register(ProxyURLStreamHandlerFactory.java:59)
        at org.netbeans.JarClassLoader.<clinit>(JarClassLoader.java:143)
        at org.netbeans.MainImpl.execute(MainImpl.java:166)
        at org.netbeans.MainImpl.main(MainImpl.java:60)
        at org.netbeans.Main.main(Main.java:58)
   ```
   
   The change opens the module at runtime successfully. There may be a more 
elegant way to achieve the same, happy to learn about it if there's one!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

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

Reply via email to