Enabling Assertion Checking For Program Execution

Assertion checking is available only if you are running version 1.4 of the J2SE platform. By default, assertions are disabled.

To enable assertion checking:

  1. From the main window, choose Tools and choose Options.
  2. In the Options window, expand Debugging and Executing and expand Execution Types.
  3. Select the desired Execution node.

    Assertion checking is available for the external executor, JAR executor, debugger executor, and locale external executor. Additional executors might be installed in your version of the IDE by extension modules.

  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 Debugging

Legal Notices