Installing Java on Windows

How to install Java JDK in windows XP and set up Java_home Environment and Java Path



Java is a programming language that allows programs to be written that can then be run on more than one type of operating system. A program written in Java can run on Windows, UNIX, Linux etc. as long as there is a Java runtime environment installed.This tutorial will show how to install Java and set up Java Environment in windows XP.

1. Download Java: The very first thing to do is download the Java Developer's Kit (jdk) onto your computer. Go to this download link to downalod the latest version of JDK.

2. Install Java: Double click on the file you just download. The installer will guide you through the installation. You should install java in either C:/java or C:/ program files/Java. Make sure you remeber where you install it, we are gonna need it. For this tutorial, lets assume, we are installing java in C:\Program Files\Java

3. Set up JAVA_HOME environment variables: 

  1. Right click on the My Computer icon from start menu and select properties

  2. Click the Advanced Tab

  3. Click the Environment Variables button

  4. Under System Variable, click New

  5. Enter the variable name as JAVA_HOME

  6. Enter the variable value as the install path for the Development Kit (C:\Program Files\Java\jdk1.5.0_14\)

  7. Click OK

  8. Click Apply Changes



4.Set Up Java Path:

  1. Follow the first three steps from 3. set up java environment to go to the Environment Variable window.

  2. In the system Variables, find "Path" (they are odered alphabetically so keep scrolling until you reach P). Select it and click edit.

  3. Now, add this" %JAVA_HOME%\bin; " add the end of the variable value with the quotes "" and with the semicolon ; . For example, if the variable value already had %SystemRoot%;%SystemRoot%\system32;...you just add %JAVA_HOME%\bin; with it making the whole variable value %SystemRoot%;%SystemRoot%\system32;%JAVA_HOME%\bin;

  4. Click Ok and Apply changes.


 

5. Test: To test that you have correctly installed java go to Start>Run>type cmd to open command prompt.
Then, type
C:\Users\username>java -version
C:\Users\username>javac -version

Successful installation of java should show appropriate information.


6. Done!!!!!
If you have any  question or problem regarding how to install Java and set up Java_home Environment and Java Path in windows XP, ask me in the comment ...
If you want to install it on Linux platform, follow below link.

http://alpeshbhavsar.wordpress.com/2010/06/14/installing-java-in-linux/