You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "KenWi11iams (via GitHub)" <gi...@apache.org> on 2026/02/06 21:07:29 UTC
[I] Cannot enable assertions in JavaFX [netbeans]
KenWi11iams opened a new issue, #9194:
URL: https://github.com/apache/netbeans/issues/9194
### Apache NetBeans version
Apache NetBeans 28
### What happened
When you use Scenebuilder, it creates a skeleton controller class for the scene. The initialize method created by Scenebuilder generates several assert statements validating the state of the GUI variables. This is very useful to ensure the FXML and java class are in synch. The assert statement is default disabled in Java. You must put the -enableassertions option on the Java command.
[skeleton GetMasterPW.java](https://github.com/user-attachments/files/25138397/skeleton.GetMasterPW.java)
Unfortunately, when you go to the project properties/Run, the VM options are disabled with the warning, "One of Run/Debug/Profile Project actions has been modified and the Run panel cannot be safely edited."
It would be very useful if assert statements count be enabled somehow.
### Language / Project Type / NetBeans Component
_No response_
### How to reproduce
Create a JavaFX application with Maven. Create a FXML file using Scenebuilder. In Scenebuilder, go to View / Show sample controller skeleton.
### Did this work correctly in an earlier version?
No / Don't know
### Operating System
Windows 11 Home 25H2
### JDK
openjdk version "24.0.1" 2025-04-15
### Apache NetBeans packaging
Community provided installer
### Anything else
The problem occurs every time.
### Are you willing to submit a pull request?
No
--
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: notifications-unsubscribe@netbeans.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [I] Cannot enable assertions in JavaFX [netbeans]
Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on issue #9194:
URL: https://github.com/apache/netbeans/issues/9194#issuecomment-4285253795
NetBeans uses the exec maven plugin to run regular java applications. If a maven project uses a different plugin, the properties window might not be able to edit the run config.
I believe the JavaFX doc still recommends the `javafx-maven-plugin` which the templates also uses:
https://github.com/openjfx/javafx-maven-plugin#javafxrun-options
to add JVM args, simply open the pom.xml and add an `<options>` tag
```xml
<plugin>
<groupId>org.openjfx</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>0.0.8</version>
<configuration>
<mainClass>test.mavenproject3.App</mainClass>
<options>-ea</options> <!-- enables assertions -->
</configuration>
<!-- ... -->
</plugin>
```
--
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: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists