Thank you. My project doesn't use Maven, but I can see that I'm on the right track. In older NetBeans versions, there used to be a "run" tab for platform applications where I could enter JVM options for my application, but that's no longer there. Hopefully someone can point me in the direction I need to go.
In the meantime, I switched to JDK11, where these are only warnings and not fatal exceptions, so I can at least continue working on getting my application functionality working using NB15. Regards, Peter ________________________________ From: Alexander Kronenwett <[email protected]> Sent: Friday, September 30, 2022 11:35 PM To: [email protected] <[email protected]> Subject: Re: Netbeans platform application and strong encapsulation Hello Peter, please see the pom.xml: https://github.com/akronenw/rust-netbeans/blob/master/pom.xml and scroll down to the surefire plugin. Alex Peter Blemel <[email protected]> schrieb am Sa., 1. Okt. 2022, 05:56: > 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 > > > > > > > > >
