✌️ 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.
- How to verify if java is installed on the computer and get version detail
- Maven Eclipse (M2e) No archetypes currently available
- How to create StackOverflow error in java
- Eclipse : The type java.lang.CharSequence cannot be resolved. Indirectly referenced from required .class files
- Maven Unsupported major.minor version 51.0
- Unsupported major.minor version 52.0 in java
- java.io.IOException: Unable to locate resource handler.properties
- Remove Trailing zeros BigDecimal Java
- connection.url property value in hibernate.cfg.xml for mysql
- JSP Hello World Program Tutorial with Eclipse and Tomcat Server
- Your JBoss Application Server 7 is running However you have not yet added any users to be able to access the admin console
- [Hibernate] The method buildSessionFactory() from the type Configuration is deprecated
- Unhandled exception type InterruptedException : Java Threads
- Struts 2 : There is no Action mapped for namespace [/] and action name [form] associated with context path [/proj]
- How to serialize-deserialize an object in java
- JBoss stuck loading JBAS015899: AS 7.1.1.Final Brontes starting
- Unbound classpath container: JRE System Library [JavaSE-1.7]
- BeanDefinitionStoreException IOException parsing XML document from class path resource [spring.xml]
- Simple Struts 2 Tutorial in eclipse with tomcat 7 server
- 7 deadly java.lang.OutOfMemoryError in Java Programming
- [Solved] com.sun.xml.ws.transport.http.servlet.WSServletContextListener ClassNotFoundException
- List of Java Keywords
- SharePoint Open in the client application document opens in browser
- Eclipse : A java Runtime Environment (JRE) or Java Development kit (JDK) must be available
- Create simple struts2 project using maven commands
- Android : Error in http connection java.net.SocketException: Permission denied - Android
- How to create Toast messages in Android - Android
- How to Search Something (string) in Android Studio Project like Eclipse - Android-Studio
- Free Unlimited Calls from MTNL & BSNL Landlines from 1st May 2015 - HowTos
- Adding internet permission to Android Project - Android
- How to turn off Facebook autoplay videos on timeline - Facebook
- Android : How to make TextView Scrollable - Android
- Sharepoint Server 2016 installation Prerequisites with download links - SharePoint
- Android Toast position top - Android
- How to submit website to dmoz directory - HowTos
- SharePoint Server 2016 setup error - A system restart from a previous installation or update is pending. Restart your computer and run setup to continue. - SharePoint
- Java XML-RPC 3.1.x based web service example - Java
- Plug-in com.android.ide.eclipse.adt was unable to lead class Error - Android