Reputation: 31313
I want to get Elastic Search running in my Windows 7 environment, but being a complete NOOB in the Java world, I am not having success.
I downloaded and installed the latest version of Java and the latest JDK. I navigate to my .\elasticsearch-0.18.6\bin directory and run elasticsearch.bat. I get ...
JAVA_HOME environment variable must be set!
Can someone enlighten me on the proper Java setup I need on my machine so everything is there that elastic search needs?
Upvotes: 12
Views: 10541
Reputation: 241
Set the JAVA_HOME Variable
Once you have the JDK installation path:
Right-click the My Computer icon on your desktop and select Properties. Click the Advanced tab, then click the Environment Variables button. Under System Variables, click New. Enter the variable name as JAVA_HOME. Enter the variable value as the installation path for the Java Development Kit. Click OK. Click Apply Changes. You might need to restart Windows.
Upvotes: 1
Reputation: 51
**How to Set Java_Home Environment**
-->Go to the drive where your windows is installed (generally it is c:\ drive) in "my computer".
-->Now go to "program files" folder and then go inside "java" folder( for a 64 bit OS, if the "JAVA" folder is not found, consider looking in "Program Files(x86)" folder). -->Look for a JAVA JDK installation folder. If you don't have it, then download java jdk and install the latest.
-->Copy the path name(e.g.C:\Program Files\Java\jdk1.8.0_05) or just write it down on paper.
-->Now go to your desktop; right click on "my computer" icon; go to properties; go to "Advanced System Settings"; click on "Environment Variables"; click "new" in "System Variables".
-->Now, in "Variable Name" write "JAVA_HOME" and in the "Variable Value" area, put in the path of the JDK installation folder(e.g. C:\Program Files\Java\jdk1.8.0_05).
-->Click "OK" and again "OK" and "OK" again. Close any open windows( Not Necessarily).
ALL DONE!!
Go ahead and run your ElasticSearch Batch file.
Upvotes: 5
Reputation: 38345
Take a look at this link about setting the JAVA_HOME environment variable. This is just the first (of many) results from a Google search for "setting JAVA_HOME environment variable".
Upvotes: 9