Assertions in NetBeans

From Apache OpenOffice Wiki
Jump to: navigation, search

To enable assertions in NetBeans, create a new configuration for executing your Java application. In the new configuration, assertions are enabled.

Open the project properties

Click right on your project and select "Properties" then go to the "Run" category:


New configuration.png


Click on "New" to create a new configuration. Enter the name of the configuration:


Configuration name.png


Click "OK" and enter the additional Java VM option to enable assertions:


Enable assertions.png


Now you just have to switch between configurations to enable/disable the assertions in your project.

Personal tools