JAVA INSTALLATION :
Note: Before installing Java in your machine , Uninstall all older or other versions of Java and check whether your required Java version is already Installed bcoz sometimes our required version might be already installed .
Steps to Install Java (JDK) in your machine :
1. First of all check whether java already installed or not installed.
To check which version of java installed in your machine.
Go to command prompt and type the following command :
// For Displaying the JRE version
cmd> java -version
java version "1.8.0_xx"
Java(TM) SE Runtime Environment (build 1.8.0_xx-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)
//For Displaying the JDK version
cmd> javac -version
javac 1.8.0_xx
Here as per above screenshot installed version is 1.8.0_25 .
If java is not properly installed on your system then you will get a message as below screenshot.'java' is not reconnized as an internal or external command.
So , after checking java version then go for uninstalling the installed java and install required version of your java version.
Uninstall java from controlpanel => uninstall or change a program => uninstall your old java.
2. Go to http://www.oracle.com/technetwork/java/javase/downloads/index-jsp-138363.html .
As per your system configuration whether it is 32 bit or 64 bit download the related JDK.
⇒ "Java SE 8u{xx}", where {xx} is the latest update number ⇒ Click the "JDK Download" button after accepting the "Accept License agreement" radio button.
Both JDK and JRE will be installed in the below locations:
JDK in : C:\Program Files\Java\jdk1.8.0_25
JRE in : C:\Program Files\Java\jre1.8.0_31
3. After installation of JDK and JRE , we have to set or edit the PATH environment variable in
our system.
WHAT IS THE NEED OF PATH VARIABLE ?
Windows OS searches the current directory and the directories listed in the PATH environment
variable for executable programs.
JDK's programs (such as Java compiler javac.exe and Java runtime java.exe) reside in directory"C:\Program Files\Java\jdk1.8.0_xx\bin" .
So we have to set PATH variable in our system which points to the directory "C:\Program Files\Java\jdk1.8.0_xx\bin".
In general we call JDK installed directory as "JAVA_HOME".
JAVA_HOME="C:\Program Files\Java\jdk1.8.0_xx".
PATH="C:\Program Files\Java\jdk1.8.0_xx\bin".
How to Set or Edit PATH Variable in our system ?
To edit the PATH environment variable in Windows XP/Vista/7/8/10:
JDK in : C:\Program Files\Java\jdk1.8.0_25
JRE in : C:\Program Files\Java\jre1.8.0_31
3. After installation of JDK and JRE , we have to set or edit the PATH environment variable in
our system.
WHAT IS THE NEED OF PATH VARIABLE ?
Windows OS searches the current directory and the directories listed in the PATH environment
variable for executable programs.
JDK's programs (such as Java compiler javac.exe and Java runtime java.exe) reside in directory"C:\Program Files\Java\jdk1.8.0_xx\bin" .
So we have to set PATH variable in our system which points to the directory "C:\Program Files\Java\jdk1.8.0_xx\bin".
In general we call JDK installed directory as "JAVA_HOME".
JAVA_HOME="C:\Program Files\Java\jdk1.8.0_xx".
PATH="C:\Program Files\Java\jdk1.8.0_xx\bin".
How to Set or Edit PATH Variable in our system ?
To edit the PATH environment variable in Windows XP/Vista/7/8/10:
- Launch "Control Panel" ⇒ "System" ⇒ Click "Advanced system settings".
- Switch to "Advanced" tab ⇒ "Environment Variables".
- Under "System Variables", scroll down to select "Path" ⇒ "Edit...".
- 1. In "Variable value" field, insert "c:\Program Files\Java\jdk1.8.0_xx\bin" (Replace xx with your installation upgrade number)
- 2. IN FRONT of all the existing directories, followed by a semi-colon (;) which separates the JDK's binary directory from the rest of the existing directories.
- Note: DO NOT DELETE any existing entries; otherwise, some existing applications may not run.
- 1. You see a table listing the existing PATH entries.
- Click "New" ⇒ Enter the JDK's binary directory "c:\Program Files\Java\jdk1.8.0_xx\bin" (Replace xx with your installation's upgrade number!!!)
- ⇒ Select "Move Up" to move it all the way to the top.
2. In "Variable value" field, INSERT "c:\Program Files\Java\jdk1.8.0_xx\bin" (Replace xx with your installation upgrade number!!!)
- 3. IN FRONT of all the existing directories, followed by a semi-colon (;) which separates the JDK's binary directory from the rest of the existing directories.
4. After setting or editing the PATH envirounment variable . Check whether it is set exactly to the location "C:\Program Files\Java\jdk1.8.0_xx\bin". By typing the following command in command Prompt.
cmd > path
- Note: Observe in the path variable they are many other application locations . This is the reason while editing PATH variable should be careful with out deleting existing applications.
=> Follow step 1 and check whether JDK and JRE installed exactly or not.
=> Sometimes even if you installed Properly it may not reflect in cmd .
In such scenarios restart your system.
=> For checking Environment variabes set properly or not . Use the
following commands and it should show it's corresponding path you set.
=>echo %JAVA_HOME% which should show JDK directory.
=>echo %ORACLE_HOME% which should show appserver home directory.
=>echo %PATH% which show JDK/bin directory along with other applications
installed.
=> Sometimes even if you installed Properly it may not reflect in cmd .
In such scenarios restart your system.
=> For checking Environment variabes set properly or not . Use the
following commands and it should show it's corresponding path you set.
=>echo %JAVA_HOME% which should show JDK directory.
=>echo %ORACLE_HOME% which should show appserver home directory.
=>echo %PATH% which show JDK/bin directory along with other applications
installed.
No comments:
Post a Comment