1. How to Install Java in Windows
By admin on Friday, May 10,2013
This tutorial provides step by step explanation of how to install Java in Windows.
Step 1: Download JDK
1. Download JDK or JRE
fromhttp://www.oracle.com/technetwork/java/javase/downloads/index.html
2. Select the version .exe format for Windows. As per your system requirement
(Windows x86 for 32-bit windows or Windows x64 for 64-bit windows).
Step 2: Installation
1. Double click the downloaded JDK exe file.
2. 2. Click on "Next" button to start Setup
3. The "Custom Setup" window allows you to choose the optional features of the
JDK, such as Development tool, Source Code etc. And also you can change the
installation directory.
3. @NOTE: if you want to use default location for JDK and JRE installation skip point
4th and 7th
4. Click on "Change…" button, to change your installation directory.
5. 6. During JDK installation, you will get new window for JRE installation. Here you can
choose optional features and also can change installation path for JRE.
6. 7. Click on "Change…" button, to change JRE installation directory
8. 9. Finally you will get "Complete" screen, click on the "Finish" button. Now you have
done your JDK and JRE installation.
9. 10. After JDK installation is done, need to configure the environment variable. Let's
come into next.
Step 3: JDK Configuration
JDK installation is OK, but need to configure the windows environment to compile and
running the java application from any location. If you have not configured windows
environment then your java program can be compile and run from <java-home>/bin dir.
To configure the installed JDK into windows, need to set environment variable
JAVA_HOME to "D:Program FilesJavajdk1.7.0_21".
1. Click on Start -> Right Click on Computer -> Select Properties.
13. 5. Under User Variables section, click on New button
6. Put Variable name JAVA_HOME and Variable value D:Program
FilesJavajdk1.7.0_21
14. 7. Press OK button to exist.
8. Now set PATH environment variable same as above. Put Variable name PATH
and Variable value D:Program FilesJavajdk1.7.0_21bin
15. 9. Now you have done your JDK configuration
Step 4: Testing Java Installation –
Before start development, need to check the installation and configuration are properly
or not.
1. Open Command prompt and type "javac", if installation is properly then it must be
show as below.