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

1
  • it turned out to be my JAVA_HOME has a ; Commented Feb 17, 2017 at 7:31

2 Answers 2

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"

Sign up to request clarification or add additional context in comments.

5 Comments

what do you mean by add new "...\Oracle\Java\javapath" ?
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
there is a "C:\ProgramData\Oracle\Java\javapath" in Path
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.
by JAVA_HOME it means path till 'jdk' or 'jre' folder (not till 'bin' folder)
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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.