For Windows 7, I've installed JDK in both 32 and 64 bit versions. The versions are 8, update 20 for all four installations. http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
when I download and unzip elasticsearch, and run /bin/service.bat or /bin/elasticsearch.bat files, I get in my terminal:
JAVA_HOME environment variable must be set!
Press any key to continue . . .
When I do, the terminal closes.
I've uninstalled and reinstalled, but that didn't fix it. Why wouldn't the environment varaible get set? Is it an installation thing, or do I actually have to manually set the variable. It just seems like if it installed correctly, it would set the variable automatically... Please help. Thanks
I've manually set the JAVA_HOME environment variable using this.
https://confluence.atlassian.com/display/DOC/Setting+the+JAVA_HOME+Variable+in+Windows
My path is C:\Progra~1\Java\jdk1.8.0_20\jre
Now, when I run service.bat, the terminal immediately closes upon opening. When I run elasticsearch.bat, the terminal prints some lines, and after a while, it just stays there, and I can't type anything.
EDIT:
I uninstalled all java, reinstalled only the JRE 64 bit, and set the system environment variable to JAVA_HOME
and `C:\Progra~1\Java\jre1.8.0_20
I have discovered that there is CLASSPATH
that's set to a 32bit, older java version. Should I delete that variable?