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?
The method for starting Elasticsearch varies depending on how you installed it. If you installed Elasticsearch with a .tar.gz package, you can start Elasticsearch from the command line. Run the following command to start Elasticsearch from the command line:
It is a powerful feature, but it can majorly affect your search speed. You should be careful when using scripts because Elasticsearch will apply the script to every result. The more data you have in the index, the slower the search will become as it goes over every result. Wildcard queries in Elasticsearch are similar to LIKE queries in SQL.
While Elasticsearch is running you can interact with it through its HTTP interface which is on port 9200 by default. To stop Elasticsearch, press Ctrl-C. All scripts packaged with Elasticsearch require a version of Bash that supports arrays and assume that Bash is available at /bin/bash.
It’s handy to recreate how Elasticsearch actually runs on your box. You might want to debug something. Or perhaps you’d just like to see the log statements scroll by this console window. This might also be handy if you’re running the zip or tarred versions directly and want to know what all the knobs and dials do.
**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.
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".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With