0

enter image description here

I want to use elasticsearch on Windows64. At first my Java version is not the same as the Java_Home.Then I reinstalled JAVA. And I found a solution said that the system will find JAVA under C:\ProgramData\Oracle\Java\javapath , So I replaced the latest java.exe javaw.exe , javaws.exe there, but the problem still exists.

I found below code in C:\elasticsearch-5.2.1\bin\elasticsearch could I do any changes to this to fix this problem?

enter image description here

shery
  • 1
  • 1
  • 2

2 Answers2

1

Have you tried following? Check your Environment variables for "JAVA_HOME" and "Path" inside system variables. The location for JAVA_HOME is your the location of your jdk For Path variable you should add new "...\Oracle\Java\javapath"

MJakhongir
  • 2,101
  • 2
  • 16
  • 27
  • what do you mean by add new "...\Oracle\Java\javapath" ? – shery Feb 17 '17 at 06:44
  • inside System variables double click variable named "Path" and inside it you will get a list of locations. If you cannot find "C:\ProgramData\Oracle\Java\javapath" among them then click new button and paste the location – MJakhongir Feb 17 '17 at 06:59
  • there is a "C:\ProgramData\Oracle\Java\javapath" in Path – shery Feb 17 '17 at 07:00
  • 1
    In my case the mistake was adding C:\Program Files\Java\jre1.8.0_144\bin instead **C:\Program Files\Java\jre1.8.0_144** to the path. – flam3 Aug 21 '17 at 06:59
  • by JAVA_HOME it means path till 'jdk' or 'jre' folder (not till 'bin' folder) – Atur Sep 22 '18 at 03:37
1

Add C:\ProgramData\Oracle\Java\javapath; to Path variable in Environment variable.

And Remove JAVA_HOME, as you have already Java Path to Path, you don't need to mention it twice.

It will surely help

Regolith
  • 2,944
  • 9
  • 33
  • 50
MayankGaur
  • 957
  • 11
  • 22