Java for a Windows

This article applies to:

The procedure to install Java broadly consists of:

Download Java

This process requires you to download an executable file that includes all the files needed for the complete installation.

  1. Go to any free java download page e.g
    (or)
  2. Click on the java version you want to download.
  3. The File Download dialog box appears prompting you to run or save the download file.
  4. Click Save to download the file to your local system.
  5. Tip: Save the file to a known location on your computer, for example, to your desktop.
  6. Close all applications including the browser.

Install Java

You do not need to remain connected to the Internet during the installation.

  1. Double-click on the saved file to start the installation process.
  2. The installation process starts. Click the 'Install' button to accept the license terms and to continue with the installation. .


  3. Oracle has partnered with companies that offer various products. The installer may present you with option to install these programs when you install Java. After ensuring that the desired programs are selected, click the 'Next' button to continue the installation. 


  4. A few brief dialogs confirm the last steps of the installation process; click 'Close' on the last dialog. This will complete Java installation process. 


Note: You may need to restart (close and re-open) your browser to enable the Java installation in your browser.

Test Installation

To test that Java is installed and working properly on your computer, run this test applet

Java PATH Setting

Following are the procedure for setting up PATH permanently

Windows XP

  1. Select 'Start', select 'Control Panel'. double click 'System', and select the 'Advanced tab'.
  2. Click 'Environment Variables'. In the section 'System Variables', find the 'PATH' environment variable and select it. Click 'Edit'. If the 'PATH' environment variable does not exist, click 'New'.
  3. In the Edit System Variable (or New System Variable) window, specify the value of the 'PATH' environment variable. Click 'OK'. Close all remaining windows by clicking 'OK'.

Windows Vista:

  1. From the desktop, right click the 'My Computer' icon.
  2. Choose 'Properties' from the context menu.
  3. Click the 'Advanced tab' (Advanced system settings link in Vista).
  4. Click 'Environment Variables'. In the section System Variables, find the 'PATH' environment variable and select it. Click 'Edit'. If the 'PATH' environment variable does not exist, click 'New'.
  5. In the Edit System Variable (or New System Variable) window, specify the value of the 'PATH' environment variable. Click 'OK'. Close all remaining windows by clicking 'OK'.

Windows 7:

  1. From the desktop, right click the 'Computer' icon.
  2. Choose 'Properties' from the context menu.
  3. Click the 'Advanced system settings' link.
  4. Click 'Environment Variables'. In the section 'System Variables', find the 'PATH' environment variable and select it. Click 'Edit'. If the 'PATH' environment variable does not exist, click 'New'.
  5. In the Edit System Variable (or New System Variable) window, specify the value of the 'PATH' environment variable. Click 'OK'. Close all remaining windows by clicking 'OK'.

Below is an example snap for clear understanding :

Note: You may see a PATH environment variable similar to the following when editing it from the Control Panel:

JAVA_HOME refers to the directory where java is installed. Variables enclosed in percentage signs (%) are existing environment variables.

Check Installation

You can check the basic installation with the following :

  1. Open a new shell and type java -version
    You should get a message like following

Note: For installing java in Mac go to www.java.com and Click 'Free Java Download' button and proceed with the instructions.

For more details please visit www.oracle.com or www.java.com