Alex Rivera | Logout

Enabling assertions in Netbeans

Asked 2009-12-10T12:14:14.440
18

I wanna do something like

java -enableassertions com.geeksanonymous.TestClass

How do I do this?

Edit
Report

1 Answer

2

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.

answered 2013-02-05T15:05:37.797

Your Answer