Set up Java environment variables

Before you begin: Verify that you are running the 32-bit version of the Java SE Development Kit (JDK).
  1. In Windows, open the Environment Variables dialog.
  2. Set the JAVA_HOME environment variable to the directory where you installed the the JDK, for example: C:\Program Files\Java\jdk1.6.0_24. In 64-bit Windows, the default path is C:\Program Files(x86)\Java\jdk1.6.0_24.
  3. In the PATH environment variable, add %JAVA_HOME%\bin; to the beginning of the string.
  4. Click OK to save and close the Environment Variables dialog.
  5. Verify that your environment variables are set correctly.
    1. Open a command prompt.
    2. Type java -version and verify that the Java version is the same as the version that you set in the environment variable:
      java version "1.6.0_24"
      Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
      Java HotSpot(TM) Client VM (build 19.1-b02, mixed mode, sharing)
      

Was this information helpful? Send us your comments.