enable assert during runtime in netbeans

assertions, java, netbeans

Solution

- Right click on your project > Properties > Run > VM Options

- Add `-ea` in the box

Problem

I tried an Assert Example it works fine in commandprompt. i run the code using following command. `java -ea AssertionExample ` but it is not showing Exception while running in netBeans Example described that assertion will work when it enables during runtime So we add `ea`. How we can enable assertion in netbeans ??

Original source

Related problems