Amith
Amith

Reputation: 1967

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

Upvotes: 3

Views: 4339

Answers (1)

assylias
assylias

Reputation: 328923

  • Right click on your project > Properties > Run > VM Options
  • Add -ea in the box

Upvotes: 12

Related Questions