Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

enable assert during runtime in netbeans

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 ??

like image 501
Amith Avatar asked Jun 09 '26 10:06

Amith


1 Answers

  • Right click on your project > Properties > Run > VM Options
  • Add -ea in the box
like image 101
assylias Avatar answered Jun 11 '26 00:06

assylias