11

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

Install Elastic Search on 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

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

 # force the server VM (remove on 32-bit client JVMs)
 -server
BassMHL
  • 8,523
  • 9
  • 50
  • 67

6 Answers6

11

Quick (hack) alternative:

  1. Copy jdk1.8.0_131\bin\client to jdk1.8.0_131\bin\server
  2. If necessary, configure Elasticsearch JVM heap size in config/jvm.options
Francis Nepomuceno
  • 4,935
  • 4
  • 29
  • 35
5

I solved this by installing Java JRE 64-bit.

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

Heiner
  • 1,869
  • 1
  • 19
  • 33
4

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

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 PATH with:

javac -version

Saïd
  • 8,780
  • 1
  • 28
  • 28
  • I think `javac -version` has a typo and should be `java -version` – Greg Trevellick Oct 17 '18 at 07:04
  • @GregTrevellick The questioner had already installed the JDK not the JRE and the JDK itself includes both `javac`, the Java compiler and `java`, the JVM. – Saïd Oct 17 '18 at 08:30
4

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

# force the server VM
-server

to:

# force the server VM
-client
PedroMVM
  • 336
  • 1
  • 5
  • 13
0

I had same issue:

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.

It got resolved just by setting java_home:

SET JAVA_HOME="C:\Program Files (x86)\Java\jdk1.8.0_131"
SET PATH=%JAVA_HOME%\bin;%PATH%
Dima Kozhevin
  • 3,602
  • 9
  • 39
  • 52
0

I faced this issue while running SonarQube Server on my local machine.

If none of the above solution works just check the SonarQube Version you are using and the JDK version it runs on which is mentioned on the SonarQube site.

Mine was SonarQube 7.9.3 https://docs.sonarqube.org/latest/requirements/requirements/

Changing JDK 15.0.1 to 11.0.9 Fixed the issue.

Karthik
  • 111
  • 6