Enabling assertions in Netbeans

前端 未结 8 2081
花落未央
花落未央 2020-12-07 00:40

I wanna do something like

java -enableassertions com.geeksanonymous.TestClass

How do I do this?

相关标签:
8条回答
  • 2020-12-07 01:18

    Right click to your project and select Properties -> Run -> Add new configuration (select a name for the configuration, in my case I named it "assertion"). Then select VM options and write -enableassertions.

    0 讨论(0)
  • 2020-12-07 01:25

    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.

    0 讨论(0)
提交回复
热议问题