How to Setup JAVA_HOME in windows

How to Setup JAVA_HOME in windows

When we working with software which dependent on JDK (Java Development Kit). It's give a problem for environment variables JAVA_HOME in windows.

 


For fix this issue we have following steps
  • Install JDK (Java Development Kit)
  • Setup up "JAVA_HOME" in Environment Variables

 

Install JDK (Java Development Kit)

You need to first download JDK from following path

Go to this url - http://www.oracle.com/technetwork/java/javase/downloads/index.html

1. Click on Java Icons or JDK Download Button.



2. Then you will see list of Java Development Kit.  You need to accept the license agreement. Then click on Windows x86 or Windows x64. JDK (Java Development Kit) available in two version x86 and x64 . You need download according to your windows platform architecture.

 

3. After download JDK. Click on executable file and install JDK. Default installation path of JDK -
 

"C:\program files\Java\[JDKVersion]"

You have option to change installation path of JDK.


 


5. Check that JDK installed

 Check path into your system "C:\program files\Java\[JDKVersion]"

[JDKVersion] - Its version of JDK



 

Setup up "JAVA_HOME" in Environment Variables

follow these steps to setup JAVA_HOME variable on your Windows system.

1 . Right click the My Computer icon on desktop and Select Properties option.



2 . Click on "Advanced system settings link"



3. Click on "Advanced" tab. then Click the "Environment Variables" button.



4. Under User Variables, click "New".



 
 
5. Enter the variable name as "JAVA_HOME" and variable value as path of JDK like this "C:\Program Files\Java\jdk1.6.0_45".  Then Click OK.



6. Scroll to the beginning of the Variable value and insert and check "JAVA_HOME" listed.



7. Check that "JAVA_HOME" setup successfully. Type "%JAVA_HOME%" on command prompt.

Note - If the changes do not take effect restart Windows.
 

8. "%JAVA_HOME%" will show you JDK root directory. That means "JAVA_HOME" setup successfully.

Enjoy!










Comments