I wanna do something like
java -enableassertions com.geeksanonymous.TestClass
How do I do this?
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.