Enabling assertions in Netbeans

前端 未结 8 2109
花落未央
花落未央 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:11

    If your are programming a web application using Tomcat the set the -enableassertions in the server settings, not on the project settings.

    In NetBeans 7.2.1 with Tomcat 6 or 7 go to: Tools (on the main menu) -> Servers -> Tomcat X.X -> Platform tab -> VM Options and add -enableassertions, then restart the server.

提交回复
热议问题