haidubogdan commented on issue #4242:
URL: https://github.com/apache/netbeans/issues/4242#issuecomment-2103434501

   I also noticed that the previous solution didn't work with netbeans 21.
   
   So I added global run arguments for java.
   
   For the moment, on **windows** OS I use the following approach :
   
   1.  go to System Properties -> Advanced -> Environment Variables...
   2. On System variables add a new a variable : 
    name : **JAVA_TOOL_OPTIONS**
    value : --add-opens=java.base/java.net=ALL-UNNAMED 
--add-opens=java.base/java.security=ALL-UNNAMED  
--add-opens=java.base/java.lang.ref=ALL-UNNAMED 
--add-opens=java.desktop/javax.swing=ALL-UNNAMED  
--add-opens=java.desktop/javax.swing.text=ALL-UNNAMED 
--add-exports=java.desktop/sun.awt=ALL-UNNAMED
   
   
![image](https://github.com/apache/netbeans/assets/15365717/a08b0467-b2aa-4849-9a92-8a02a04a8415)
   
   3. In netbeans when you do a build you should see in the Output window a 
message like this : `Picked up JAVA_TOOL_OPTIONS: 
--add-opens=java.base/java.net=ALL-UNNAMED ...`
   


-- 
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