Enabling Assertions from the Command Line: -ea and -da enable and disable assertion in a package subtree or in a class. : Assert « Language Basics « Java






Enabling Assertions from the Command Line: -ea and -da enable and disable assertion in a package subtree or in a class.

  

java -ea MyApp

java -ea:... MyApp

java -ea:com.mycompany... MyApp

java -ea:com.mycompany... -da:com.mycompany.MyClass MyApp

   
    
  








Related examples in the same category

1.A Program with Assertions
2.Handling an Assertion Error
3.Catch assert exception with message
4.Assert with an informative message
5.Non-informative style of assert
6.Using the class loader to enable assertions
7.Class for checking syntax and comments for the assert
8.Assert Util
9.Assertion utility class that assists in validating arguments.
10.An assertion utility just for simple checks.