1

please help with my problem that I'm facing since hours. I'm trying to run ElasticSearch-5.2.2 with MEAN Stack. I installed Java JDK 8 and I set the path correctly and also added this path "\Oracle\Java\javapath" still I'm getting the same error "Could not find any executable java binary. Please install java in your PATH or set JAVA_HOME". Why it is happening can anyone help me out?

2
  • you say " I set the path correctly" - can you tell us what you did to set it correctly so we can make sure you actually did do it correctly? Commented Mar 23, 2017 at 22:03
  • I went to environment variables and added variable name: JAVA_HOME variable value: C:\Program Files\Java\jdk1.8.0_121\bin and in System Variables in Path C:\Program Files\Java\jdk1.8.0_121\bin Commented Mar 23, 2017 at 22:18

2 Answers 2

3

You said you "went to environment variables and added variable name: JAVA_HOME variable value: C:\Program Files\Java\jdk1.8.0_121\bin"

This is incorrect. Don't include the bin directory when you set JAVA_HOME. Set JAVA_HOME to C:\Program Files\Java\jdk1.8.0_121

Once you are done with this, test it. Open command prompt and type echo %java_home% and see if its printing the path you set.

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

2 Comments

Wow, Perfect Man! You are right. Appreciate your response.
That's why I asked :)
0

Are you using Windows?

If so open your system environment variables and add a new one named JAVA_HOME and point it to your Java JDK

You can double check how to do this by referring to the thread here How to set java_home on Windows 7?

But what have you tried so far?

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.