Code2care : TechZone Apps & Tutorials

Setting Java_Home Environment variable on Windows Operating System

Prerequisite : You have installed Java Runtime Environment (any version jre6,jre7 or jre8)

Lets see how you can set Java_Home Environment variable for Windows Operating systems,

Step 1. Find-out where JRE has been installed

    Once you install JRE you need to locate where java has been installed on your system. And the folder that you need to look for is Program Files

    Note : If you have a 64-bit Windows Operating system installed then you will have 2 program files folders under C:/

    1. Program Files
    2. Program Files(x86)

    If you find the Java folder under "Program Files(x86)" then the installed java version is 32-bit, if you find it under "C:/Program Files/Java" means Java version is 64-bit.

    Look that you can see jre6 folder under java directory, i.e. : C:/Program Files/Java/jre6 or C:/Program Files(86)/Java/jre6

Step 2. Setting-up JAVA_HOME

    1. Right Click on My Computer icon and select Properties option and Select Advance tab.

    2. Now look for Environment Variable button and Click on it.

    3. Now look for System Variables and click on New,

    4. Add Variable name => JAVA_HOME and Variable value => C:/Program Files/Java/jre7 or C:/Program Files(86)/Java/jre7

    5. Click OK and Apply Changes.

For Windows 7

    1. Go to Start menu and select Computer

    2. Select System Properties from the context menu

    3. Now click on Advanced system settings and go to Advanced tab

    4. Now click on Environment Variables

    5. Under System Variables look for PATH.

    6. Modify PATH by adding the location of the class to the value for PATH.

    7. Reopen Command prompt window, run your java code, if the code works, path is been set correctly.

Setting JAVA_HOME using Eclipse

    You can set the java environment variable in eclipse by going to,

    Eclipse -> Window -> Preferences -> Java -> Installed JREs

    Now here you can search for the location where the JRE is been installed and select it.


Posts related to java.

1. Your System has Mac OS X Version 10.10. Java from Oracle requires 10.7.3 or later error

2. Detect if Cookies are enabled using javascript

3. Digital clock example using javaScript with Source code

4. Setting Java_Home Environment variable on Windows Operating System

5. How to get Timestamp in Java Android Programming

6. How to detect Browser and Operating System Name and Version using javaScript

7. Java JRE Installation location Mac OS X 10.10 Yosemite

8. Top 15 Programming Languages to learn 2014-2015

9. Difference between using Scanner Class and String args for user input in Java

10. Remove Trailing zeros BigDecimal Java

11. How to get UTC (GMT) using javascript

12. Get Device Screen Width and Height using javaScript

13. Comprehensive 256 Ascii code table with Html Hex IBM Microsoft Key

14. Eclipse Failed to load the JNI shared library jvm.dll

15. Add Animated Scrolling to Html Page Title Script

16. How to make jsfiddle bootstrap ready

17. JRE 8 dmg for Mac OSX 10.10 Yosemite downloading speed goes to 0 kb/s when trying to download from Oracle Website

18. Loading previous page using html button using javascript

19. Java location in Mac OS X


Posts related to windows.

1. Go to Line Number option in Windows Notepad

2. Add Custom header and footer to Windows Notepad file

3. How to install Ubantu from USB Pendrive Stick

4. Bypass domain name for IIS site

5. Setting Java_Home Environment variable on Windows Operating System

6. Light-weight GIF Screen Capture application for Windows and Mac OS X systems

7. How to Rotate Android Emulator on Mac OSX Windows and Linux

8. Learn Objective-C on Windows

Popular tags
x 175
x 29
x 20
x 14
x 14
x 14
x 13
x 11

1000+ C Programs     PHP Tutorial     JSON Tutorial     Swift Tutorial     India Pinocdes     About Us     Privacy Policy

Code2care © 2012-17