Home Java Java-tips Background 30java_tools Java Development Kit (JDK)

Ask Questions?

View Latest Questions

Advertisement


 
 

Java Development Kit (JDK)
Posted on: July 26, 2006 at 12:00 AM
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.

Java Notes

Java Development Kit (JDK)

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.

  • From the DOS command window with the javac command.
  • With a program editor (eg, TextPad) which has an interface to the compiler.
  • With an IDE (Integrated Development Environment). See IDEs.

Free Download

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.

  • J2SE - Java 2 Standard Edition - You want this.
  • Not J2ME - Java 2 Micro Edition - This is for phones, PDAs, etc.
  • Not J2EE - Java 2 Enterprise Edition - You don't want this unless you're doing Java client server programming, and even then, you probably don't need it.
  • Not JRE - Java Runtime Environment - This will automatically be installed when you install the JDK.

If you're a Macintosh user, it might already be installed on your system. Look at Java for Mac OS X.

Installation

Installing the JDK is easy (at least in Windows). Just follow the prompts.

CLASSPATH

If you're using commands from the DOS command window, you will probably have to set CLASSPATH. See CLASSPATH.

JVM runtime -enableassertions (-ea) option

CommandEffect
java MyProgAssert statements are removed by class loader.
java -enableassertions MyProgAssert statements are executed.
java -ea MyProgShort 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.

Copyleft 2005 Fred Swartz MIT License
Advertisement


DMCA.com