Assertions in NetBeans

From OpenOffice.org 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:


Image:new_configuration.png


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


Image:Configuration_name.png


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


Image:Enable_assertions.png


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

Personal tools
Create a book