Java 1.6 Installation and Configuration (Windows XP)


Getting Java Development Kit (JDK)

  • Go to http://java.sun.com/javase/downloads/index.jsp
  • Choose the newest JDK package and click Download button.


  • In the next page, choose Microsoft Windows as our operating system
  • In Download page click "Accept" and choose "Windows Offline Installation, Multi Language"


  • Sometimes we are asked to register or login to a Sun account before we continue downloading the software. If you already have an account, login or register if you don't have it.

  • Downloading the package

Installation

  • Run the download setup program
  • You will have an initial dialog, click on Next button


  • Choose Accept



  • Choose Custom Setup
  • Click on next to continue



  • Wait for the installation process to finished



  • If you already installed the JDK part, then you will asked to install JRE (Java Runtime Environment). Click on Next.



  • Wait until JRE installation finish


  • Click on Finish after all the installations had been done



PATH Configuration

  1. Set environment variable, %PATH%.
  • Klik Start pada sistem Windows Anda
  • Klik kanan icon My Computer, pilih Properties




  • Pada dialog System Properties
  • Klik tab Advanced  |  Environment Variables


  • Cari variable Path.
  • Pada bagian System variables dan klik Edit.


  • Tambahkan satu nilai pada Variable Value yaitu folder binary instalasi JDK. Untuk contoh pada blog ini maka path kita adalah C:\Program Files\Java\jdk1.6.0_05\bin. Note that between folder path we have to separate it with a semi-colon (;).



  • Click OK

JAVA_HOME Configuration

  1. Set environment variable, %JAVA_HOME%.
  2. With Environment Variables window still open, click on New button


  3. Set the value as shown below
    • Variable name : JAVA_HOME
    • Variable value : C:\Program Files\Java\jdk.1.6.0_05


  4. Click OK
  5. Done

Verification

  1. OPen a terminal (Windows command prompt). Choose Start > Run, type cmd and press Enter
  2. Type "java -version" and if succeed you will get result like below


  3. Type "javac -version" and if succeed you will get result like below


  4. Done