Thanks, Alex. I think this is probably right. My question is confusing because it should have said, "in the debugger AND from the installer?"
Meaning, I want to be able to launch my app from NetBeans using the debugger and have the settings also work when my app is installed using the installer. I tried adding this line to my platform.properties, but it doesn't seem to work. default_options="--add-opens=java.desktop/javax.swing.plaf.basic=ALL-UNNAMED --add-opens=java.desktop/javax.swing.text=ALL-UNNAMED --add-opens=java.desktop/javax.swing=ALL-UNNAMED" Can you give me a specific example of what you added to your conf file? Thanks, Peter ________________________________ From: Alexander Kronenwett <[email protected]> Sent: Friday, September 30, 2022 9:21 PM To: [email protected] <[email protected]> Subject: Re: Netbeans platform application and strong encapsulation Hello Peter, I had a similar issue a few days ago. I had to put those flags to the netbeans default options in the netbeans.conf file. Depending on your usecase, they might be required elsewhere (I had to put them to the config of the surefire plugin as well). I hope that helps. Alex Peter Blemel <[email protected]> schrieb am Sa., 1. Okt. 2022, 03:31: > Hello everyone, > > I am updating my platform application to use NB15 and OpenJDK 17. My > application has a text editor, which now throws the exception: > > module java.desktop does not "opens javax.swing.text" to unnamed module > > Reading up on Strong JDK Encapsulation, I understand that I need to modify > my platform application to include "add-opens". I found > https://github.com/apache/netbeans/blob/master/nbbuild/jms-config/desktop.flags > and see > > --add-opens=java.desktop/javax.swing.plaf.basic=ALL-UNNAMED > --add-opens=java.desktop/javax.swing.text=ALL-UNNAMED > --add-opens=java.desktop/javax.swing=ALL-UNNAMED > > Where do I need to put these so that I can launch my app in the debugger > from the installer? > > Thanks, > Peter > > > >
