Installation of Java

In this tutorial we will provide step by step guide to install java and setting up it's path for execution of java program. Follow these guideline to configure your machine for java.


Step 1 Download JDK

First of all visit oracle web site for JDK downloading.
Download Java Development Kit


On above link accept licence agreement. On the page you will find options for various platform. Select according to your platform and if your machine is 32 bit then download x86 jdk and if your machine is 64 bit then download x64 jdk.

Once download is complete then double click on downloaded file. It will start installation process.

Step 2 Install Java

Start installer by double clicking on downloaded file.

Read installation steps and follow them. It will take few seconds to complete installation process.


Step 3 Set-up environment variable

javac and java command won't be recognised by command prompt because these are not inbuilt commands. In order to use these commands, java's path has to be specified in your operating system environment.

Follow these instructions :

Open system properties window. Right click on "my computer" icon and select properties.

In Properties windows in left side there will be an "Advanced System Setting" link, click that link.

Click on Environment variable Button.



Click on new button because new environment variable need to be created. In Environment variable window there are two type of variable one is users variable and second is System variables. You will find two new button, click on first button under tag "User variable".

Specify variable name and value in window opened in previous step. Name of variable will be PATH . In value box you need to specify location of your jdk/bin directory.

	     My Computer --> C:/ --> Programs Files --> Java --> jdk<version> -->bin
		 

Go to bin directory and copy path from path bar.

After copying, paste copied value in value box.



Setting path temporarily

Java's environment can be set temporarily as well. It will work only for current session. Open command prompt in your system. Click on window button[windows 7] or start button[windows xp], open run utility and type cmd.

		  Start --> Run --> cmd
		

Run following command in command prompt.

 set PATH="<path of bin directory>"
		 

Copy path of bin directory of java. For example:

 set PATH="C:\Program Files\Java\jdk1.8.0\bin"
		 
Remember Temporarily setting path only works for one session. As soon as you close command prompt this information will be lost and next time you have to set path again.