0

I have installed Java on a Windows 10 system.

java --version works fine as it can show the Java version.

However, when running anything Java-related, the following error is thrown:

error : could not find java in JAVA_HOME or bundle at C:\Program Files\Java\jdk-14.0.1\bin/bin/java

I am not sure what is wrong with the configurations.

Below are the attached screenshots:

error Sreenshot envioremnt variables screenshot

tried with java_home and without /bin

Jan Schultke
  • 17,446
  • 6
  • 47
  • 96
  • It seems you only added java installation to PATH variable, but somehow Elasticsearch requires JAVA_HOME to be set. So you need to have JAVA_HOME pointed to *C:\Program Files\Java\jdk-14.0.1* and PATH variable should contain *%JAVA_HOME%\bin* – Alexander Terekhov May 10 '20 at 09:39
  • [Perfectly detailed answer is already given here](https://stackoverflow.com/a/17142065/12718463) Follow this steps carefully – Siddharth Shah May 10 '20 at 09:41
  • Thanks for assisting, actually JAVA_HOME and PATH both are done now, on user and system level both. but throwing the same error, also tried path excluding bin, but the error persists. if you look closely its actually missing up the file structure of java, I mean at the end of the error line. \jdk-14.0.1\bin/bin/java. also please have a look at the third screenshot I have updated the question. – Lorel Carpo May 10 '20 at 10:00

1 Answers1

0

Try without the Bin. Then it should work!