✌️ Prerequisite : You have installed Java Runtime Environment (any version jre6, jre7 or jre8)
Let's 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:/
- Program Files
- 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
- Right Click on My Computer icon and select Properties option and Select Advance tab.
- Now look for Environment Variable button and Click on it.
- Now look for System Variables and click on New,
- Add Variable name => JAVA_HOME and Variable value => C:/Program Files/Java/jre7 or C:/Program Files(86)/Java/jre7
- Click OK and Apply Changes.
For Windows 7
- Go to Start menu and select Computer
- Select System Properties from the context menu
- Now click on Advanced system settings and go to Advanced tab
- Now click on Environment Variables
- Under System Variables look for PATH.
- Modify PATH by adding the location of the class to the value for PATH.
- 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.
- JBoss stuck loading JBAS015899: AS 7.1.1.Final Brontes starting
- Difference between using Scanner Class and String args for user input in Java
- 7 deadly java.lang.OutOfMemoryError in Java Programming
- Struts 2 : There is no Action mapped for namespace [/] and action name [form] associated with context path [/proj]
- SharePoint Open in the client application document opens in browser
- How to display Java Date Time timezone offset
- How to fix Java HTTP java.net.UnknownHostException
- Java Split String by Spaces
- Error: Unable to access jarfile jarFileName.jar file [Windows]
- Read and Parse XML file using Java DOM Parser [Java Tutorial]
- [Java] Error: Unmappable character for encoding UTF-8. Save could not be completed.
- Unhandled exception type InterruptedException : Java Threads
- XmlRpcException ConnectException connection refused error
- Display Era details (AD BC) in Java Date
- Simple Struts 2 Tutorial in eclipse with tomcat 7 server
- Java: TimeZone List with GMT/UTC Offset
- How to serialize-deserialize an object in java
- [Fix] java.net.MalformedURLException: unknown protocol
- IntelliJ: Error: Could not find or load main class, java.lang.ClassNotFoundException
- Java - PatternSyntaxException
- Unbound classpath container: JRE System Library [JavaSE-1.7]
- [Java Threads] Should we extend Thread Class or implement Runnable interface
- Java XML-RPC 3.1.x based web service example
- Eclipse : A java Runtime Environment (JRE) or Java Development kit (JDK) must be available
- Java TLSv1.3 protocol code example using SSLSocket
- 100+ SEO Tips to improve your website search ranking - HowTos
- [Solved] Mic not working on iPhone 7 after iOS 14 upgrade - Apple
- Maven Eclipse (M2e) No archetypes currently available - Java
- MySQL Error :1007 SQLSTATE: HY000 (ER_DB_CREATE_EXISTS) Message: Can't create database '%s'; database exists - MySQL
- FileZilla Connection time out Failed to retrieve directory listing - FTP
- Understanding grep command and its usage [Unix/Linux/macOS/Windows-Bash] - HowTos
- How to fix Microsoft Windows 10 update error 80070020 - Microsoft
- ASCII Code Table - table
- How to Configure Eclipse keymap in IntelliJ IDE - Android-Studio
- How to add Back Button on Toolbar in Android [Tutorial] - Android
- How to check RAM details on Mac? - MacOS
- How to use HashTags # correctly on Social Media Facebook Twitter - HowTos
- MainActivity error: cannot find symbol FloatingActionButton - Android
- How to Change or Set a new Password for your Wi-Fi Router - HowTos
- Prettify JSON in Notepad++ - NotepadPlusPlus
- Install Java Runtime Environment (Oracle or open JRE) on Ubuntu - Linux
- Increase Font Size of Eclipse Java Code - Eclipse
- Detect Data roaming in Android Application - Android