| Eclipse
FAQ Spring 2006, David Matuszek |
This FAQ should be correct for Eclipse 3.1.1; however, in some cases the answers may be based on an older version of Eclipse.
Source->Format
really mess up my formatting?assert statements, but does not enable
them.
The above will make
If you must use Java 1.4, there's a lot more you need to do:
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 legal to have
in your code, but they will be disabled (they won't actually do anything).
To enable 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?javadoc.exe. You already have this
file:
C:\Program Files\Java\j2sdk1.5.0\bin\javadoc.exe,
(or something similar)System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Commands/javadocpublic through private).
Other people should usually just see documentation for your public
fields and methods, but you may want more extensive documentation for
your own use.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?]jdk-1_5_0-src.scsl.zip.
Do not unzip this file; Eclipse likes it the
way it is.rt.jar. Select Source attachment
and click Edit....NullPointerException or an ArrayIndexOutOfBoundsException.workspace folder, create a new folder, and put
your files into that folder.