Java Elasticsearch 安装:在 ...jvm.dll 中缺少“服务器”JVM 错误

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/44551961/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-12 01:35:17  来源:igfitidea点击:

Elasticsearch installation : Error missing 'server' JVM at ...jvm.dll

javaelasticsearchjava-8

提问by BassMHL

After having downloaded elasticsearch and unzipped it following the steps in this link:

下载elasticsearch并按照此链接中的步骤解压缩后:

Install Elastic Search on Windows

在 Windows 上安装弹性搜索

I am receiving the following error:

我收到以下错误:

Error: missing 'server' JVM at 'C:\Program Files (x86)\Java\jre1.8.0_131\bin\server\jvm.dll'.
Please install or use the JRE or JDK that contains these missing components.

Note: I also had to install the JDK8 as suggested in this resolution

注意:我还必须按照此解决方案中的建议安装 JDK8

Should I change something in the .config file? Maybe this line?

我应该更改 .config 文件中的某些内容吗?也许这条线?

 # force the server VM (remove on 32-bit client JVMs)
 -server

采纳答案by Saheed

Set your JAVA_HOMEenvironment variable to point to the path of your JDK 8installation.

JAVA_HOME环境变量设置为指向JDK 8安装的路径。

You can do this on the command line as the example below illustrates:

您可以在命令行上执行此操作,如下例所示:

SET JAVA_HOME="C:\Program Files (x86)\Java\jdk1.8.0_131"
SET PATH=%JAVA_HOME%\bin;%PATH%

Confirm that the correct version of the JDK is in your PATHwith:

确认您的 JDK 版本正确PATH

javac -version

javac -version

回答by Heiner

I solved this by installing Java JRE 64-bit.

我通过安装 Java JRE 64 位解决了这个问题。

And then setting the environment variable JAVA_HOME to this version. (In my case C:\Program Files\Java\jre1.8.0_131)

然后将环境变量 JAVA_HOME 设置为这个版本。(就我而言C:\Program Files\Java\jre1.8.0_131

回答by Neps

Quick (hack) alternative:

快速(黑客)替代方案:

  1. Copyjdk1.8.0_131\bin\clientto jdk1.8.0_131\bin\server
  2. If necessary, configure Elasticsearch JVM heap size in config/jvm.options
  1. 复制jdk1.8.0_131\bin\clientjdk1.8.0_131\bin\server
  2. 如有必要,配置 Elasticsearch JVM 堆大小 config/jvm.options

回答by PedroMVM

I solved my issue editing that line of file jvm.optionsfrom:

我解决了我编辑该行文件的问题jvm.options

# force the server VM
-server

to:

到:

# force the server VM
-client