The most popular Java compiler is Sun's Software Development Kit (JDK) (aka the Software Development Kit (SDK)). It's free, and does a good job. The only problem is that the compiler is only a compiler - there is no editor and no graphical user interface. It is typically used in one of the following ways.
javac command.Download only the J2SE JDK from java.sun.com. There are three editions - get the "standard edition". Sun has major problems getting the names right, so this is still called Java 2 some places altho it is Java 5 in others.
If you're a Macintosh user, it might already be installed on your system. Look at Java for Mac OS X.
Installing the JDK is easy (at least in Windows). Just follow the prompts.
If you're using commands from the DOS command window, you will probably have to set CLASSPATH. See CLASSPATH.
-enableassertions (-ea) option| Command | Effect |
|---|---|
java MyProg | Assert statements are removed by class loader. |
java -enableassertions MyProg | Assert statements are executed. |
java -ea MyProg | Short form for allowing assertions. |
It's also possible to enable/disable assertion checking at runtime for individual classes or for library routines, but that level of control is not useful for most purposes.