table of contents
close
 Top

table of contents

Executive Summary
Details
More Information

Installing the Java Development Kit

Precursor to Installing Tomcat


Executive Summary

Before you use Tomcat (with or without an IDE), make sure that you have Java 6 Standard Edition (aka JDK 1.6) or Java 5 Standard Edition (aka JDK 1.5) installed. Here is a quick summary; see the next section for details.

  1. Download and install Java from http://java.sun.com/javase/downloads/. I use JDK 1.6.0_10, but any Java 5 or 6 version will work.
  2. Set your PATH environment variable to include the Java "bin" directory. Use autoexec.bat or the Control Panel.

For a very quick test, open a DOS window and type "java -version" and "javac -help". Make sure you get a response both times.


Details

  1. Download and install Java SE 6 or Java SE 5. For Windows, Solaris, and Linux, get Java 6 (aka JDK 1.6) from http://java.sun.com/javase/downloads/ and Java 5 (aka JDK 1.5) from http://java.sun.com/javase/downloads/index_jdk5.jsp. For MacOS, get Java from http://developer.apple.com/java/download/. Be sure to get a "JDK" (Java Development Kit, which includes the Java compiler javac), not just a "JRE" (Java Runtime Environment, which includes only java for executing .class files). Don't get the "with Java EE" version, and don't get the NetBeans version unless you want the NetBeans IDE. I use JDK 1.6.0_10, but any Java 5 or 6 version will work.
  2. Set your PATH environment variable to include the Java "bin" directory. For example, if you have 1.6.0_10, you could set your PATH by putting the following line in your C:\autoexec.bat file.
      set PATH="C:\Program Files\Java\jdk1.6.0_10\bin";%PATH%
    You could also go to the Start menu, select Control Panel, choose System, click on the Advanced tab, press the Environment Variables button at the bottom, and enter the PATH variable and value directly. Once you've installed Java, confirm that everything including your PATH is configured properly by opening a DOS window and typing "java -version" and "javac -help". You should see a real result both times, not an error message about an unknown command. Note that if you use autoexec.bat, you have to reboot before the changes take effect.

More Information

Online documentation