Enabling Assertion Checking For Debugging

Assertion checking is available only in J2SE v. 1.4. By default, assertions are disabled.

To enable assertion checking for debugging:

  1. From the main window, choose Tools and choose Options.
  2. In the Options window, expand Debugging and Executing and expand Debugger Types.
  3. Select the Default Debugging node.
  4. On the Properties tab, find the External Process property, click its value, and click the ellipsis (...) button.
  5. In the property editor, find the Arguments field and insert -ea in front of the list of command-line switches.
Tip You can enable assertions with various granularities. See http://java.sun.com/j2se/1.4/docs/guide/lang/assert.html for more information.
See also
Enabling Assertion Checking for Program Execution

Legal Notices