| CIT 594 Eclipse FAQ Spring 2004, David Matuszek |
Source->Format
really mess up my formatting?assert statements, but does
not enable them.In Eclipse 3, the settings are a little fussier. Go to Window -> Preferences -> Java -> Compiler -> Compliance and Classfiles and set:To enable (make active)
Compiler Compliance Level: to 1.4
Use default compliance settings to unchecked
Generated .class files compatibility: to 1.4
Source compatibility: to 1.4
Disallow identifiers called 'assert': to Error
Compiler Compliance Level to 1.4
assert statements, you must set a flag
to the compiler. Go to Run -> Run... -> Arguments, and in
the box labeled VM arguments:, enter either -enableassertions
or just -ea. Accept the changes and close the dialog.assert statement, see How
do I run Javadoc?public fields
and methods.assert statements, you can click Finish
at this point.assert
statements will be treated as errors). [See also How
do I get the assert statement to work?]NullPointerException or an ArrayIndexOutOfBoundsException.Source->Format
really mess up my formatting?