Set Java Environment Variables on a server

  1. JAVA_HOME
    C:\Program Files (x86)\Java\jdk1.6.0_20
  2. Path
    ;%JAVA_HOME%\bin;

    WARNING: do not replace what is already in your "Path" variable. Just append ;%JAVA_HOME%\bin; to the end of your "Path" variable.
  3. CLASSPATH
    .;C:\Program Files (x86)\Java\jdk1.6.0_20\lib;
  4. TO MAKE SURE IT WORKED:
    Open a new command prompt and type in:
    java -version

    If it says that java is "unrecognized", then you have done something wrong...either you have not installed java correctly, or you did not set the JAVA_HOME and Path variables correctly.
« Back to Home