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?

spiderman
  • 10,892
  • 12
  • 50
  • 84
Arjun
  • 103
  • 2
  • 13
  • 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? – Brian Pipa Mar 23 '17 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 – Arjun Mar 23 '17 at 22:18

2 Answers2

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.

spiderman
  • 10,892
  • 12
  • 50
  • 84
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?

Community
  • 1
  • 1
Coder
  • 101
  • 1
  • 1
  • 8