Elasticsearch无法在Windows Git Bash上启动

时间:2016-10-30 04:16:41

标签: elasticsearch

我正在尝试使用bin/elasticsearch命令启动Elasticsearch,但我收到的错误是Could not find or load main class org.elasticsearch.bootstrap.Elasticsearch,如下所示。

me@DESKTOP-T11JTA5 MINGW64 ~/elasticsearch-1.3.4
$ pwd
/c/Users/jacky/elasticsearch-1.3.4

me@DESKTOP-T11JTA5 MINGW64 ~/elasticsearch-1.3.4
$ ls
bin/  config/  lib/  LICENSE.txt  NOTICE.txt  README.textile

me@DESKTOP-T11JTA5 MINGW64 ~/elasticsearch-1.3.4
$ bin/elasticsearch
Error: Could not find or load main class org.elasticsearch.bootstrap.Elasticsearch

1 个答案:

答案 0 :(得分:1)

可能你的JAVA_HOME没有指向你的JRE 1.7目录。

尝试类似:

set JAVA_HOME=C:\Program Files\Java\jre7

当然,改变实际Java安装路径的路径。如果您不这样做,请安装Oracle's Java 1.7