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 7 Standard Edition (aka JDK 1.7) or Java 6 Standard Edition (aka JDK 1.6) installed. Here is a quick summary; see the next section for details.

  1. Download and install Java from http://www.oracle.com/technetwork/java/javase/downloads/index.html. I use JDK 1.7.0_03 and JDK 1.6.0_31, but any Java 6 or 7 version will work. If you will use Java and Tomcat only from within Eclipse (recommended!), you are now done, and you can skip the rest of this page.
  2. Set your PATH environment variable to include the Java "bin" directory. Use autoexec.bat or the Control Panel. This step is not needed if you use Java and Tomcat only from within Eclipse.

For a very quick test, open a DOS window and type "java -version" and "javac -help". If you set the PATH properly, you will get a response both times. If you don't set the PATH, "java -version" should still work, but "javac -help" will not. This is fine if you plan to use Java and Tomcat only from within Eclipse (recommended!).


Details

  1. Download and install Java SE 7 or Java SE 7. For Windows, Solaris, and Linux, get Java 7 (aka JDK 1.7) or Java 6 (aka JDK 1.6) from http://www.oracle.com/technetwork/java/javase/downloads/index.html. For MacOS, get Java from http://support.apple.com/kb/DL1516. 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.7.0_03 and JDK 1.6.0_31, but any Java 7 or 6 version will work.
  2. Set your PATH environment variable to include the Java "bin" directory. Note that this step is not needed if you use Java and Tomcat only from within Eclipse. For example, if you have 1.6.0_31, 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_31\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

Java

JSF (JavaServer Faces)

Servlets & JSP
Ajax, GWT, & JavaScript

Spring, Hibernate, & JPA

Struts