windows7上elasticsearch的安装错误

时间:2017-06-04 06:06:46

标签: java windows elasticsearch

我一直在尝试按照https://www.elastic.co/guide/en/elasticsearch/reference/current/_installation.html在windows7机器中设置elasticsearch 我能够下载,解压缩,但在运行./elasticsearch时,我收到以下错误,

Error: Could not find or load main class 
org.elasticsearch.tools.JavaVersionChecker
Elasticsearch requires at least Java 8 but your Java version from C:\Program 
Files\Java\jdk1.8.0_131/bin/java does not meet this requirement

我已经验证了已安装的Java版本,它们看起来很好,

$ java -version

java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

$ javac -version     javac 1.8.0_131

有人可以指出我错在哪里吗?

2 个答案:

答案 0 :(得分:0)

Windows 中运行 Elasticsearch 时,您应该直接使用elasticsearch.bat而不是./elasticsearch

  

现在我们已经准备好启动我们的节点和单个集群(Windows用户应该运行elasticsearch.bat文件):

答案 1 :(得分:-1)

似乎您没有正确的权限。尝试将它们设置为774并再次检查:

sudo chmod 774 -R elasticsearch-6.3.2/