Q:

Cannot install elasticsearch 5.1.1 on windows 10 with java 8

I am attempting to install ElasticSearch 5.1.1 on my windows 10 's laptop with java 8.111 installed.
when I try to install Elastic search that triggers an error
C:\Users\userName\Downloads\elasticsearch-5.1.1\elasticsearch-5.1.1>.\bin\elasticsearch
Displays me that error message  : 
Error: missing `server' JVM at `C:\Program Files (x86)\Java\jre1.8.0_111\bin\server\jvm.dll'.
Please install or use the JRE or JDK that contains these missing components.

I found a fix for that type of error with java . That consist in creating a folder server and to copy paste jvm.dll into. 
But it should be avalaible for java 7 cause if I try that fix and I launch the installation again I have now the error message:
Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap

If has no sens cause I have 8 go of RAM
Do you have idea about what I should do to install ElasticSearch?

A:

Goto config folder and open elasticsearch.yml file then do below changes.
Uncomment the cluster.name and node.name in elasticsearch.yml like below and give your own cluster and node name.
cluster.name: ESCluster

node.name: ESNode

Change heap size in jvm.options
-Xms1g
-Xmx1g

Goto bin folder then run elasticsearch.bat

A:

Check if the Java software that you install is 64bit(on 64bit machine).
When you install "elasticsearch" on 64bit Windows machine, it searches for 64bit Java on the computer, and when you install Java, by default, you install 32 bit Java.

