Enabling assertions in Netbeans

andandandand picture andandandand · Dec 10, 2009 · Viewed 20.2k times · Source

I wanna do something like

java -enableassertions com.geeksanonymous.TestClass

How do I do this?

Answer

MrDrews picture MrDrews · Jun 30, 2011

With a Maven project in netbeans 7.0, choose "File" -> "Project Properties ()".

In the window that appears, choose "Run", and add -enableassertions to the "VM Options" textbox.