Search code examples
javanetbeansassertions

Enabling assertions in Netbeans


I wanna do something like

java -enableassertions com.geeksanonymous.TestClass

How do I do this?


Solution

  • The easiest way is to use the Run properties. The property is labeled 'VM Options'.

    This tutorial has more detailed info and screen shots from NetBeans 5.5. The dialog is very similar in the most recent release of NetBeans; 6.8, which is available today.