-1

Context: I am trying to install Hadoop on my Windows 10 machine. I've followed the directions here and I'm having a lot of difficulty completing the process. I keep raising the following error:

The system cannot find the path specified. Error: JAVA_HOME is incorrectly set. Please update C:\Users\eric\Downloads\hadoop-3.1.4.tar\hadoop-3.1.4\hadoop-3.1.4\etc\hadoop\hadoop-env.cmd'-Dhadoop.security.logger' is not recognized as an internal or external command, operable program or batch file.

When I check the version of Java I get the following, so I know for sure Java has been installed.

C:\Java\bin>java -version
java version "1.8.0_261"
Java(TM) SE Runtime Environment (build 1.8.0_261-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.261-b12, mixed mode)

I gather from the above error there's an issue with the path in the environment variable I've set for JAVA_HOME. I'm really unclear why the error refers to that directory in the message because when I echo %JAVA_HOME% at terminal I get C:\Java\bin as the environment variable path (as recommended here).

Question: I'm guessing the jdk file cant be found/is lost or something else. How do I resolve these issues? And where can I find this JDK file (the jdkl.8.0_241 file shown @11:55 in the video) because it doesnt appear to be in the bin folder of the JDK download? Please help. This question is NOT a duplicate, because the issue seems to be more closely related to the JDK file.

emalcolmb
  • 1,585
  • 4
  • 18
  • 43

1 Answers1

0

JAVA_HOME should be point to the root directory of a Java JDK and should be specified in the environment variables. After setting this value a restart of the terminal/application/console/IDE/command-prompt is required to make the new value active.

If you simple give: java --version it use the first java.exe version found on your PATH. JAVA_HOME and the PATH java version don't have any relation with each other.

JAVA_HOME can be specified for example to: "c:/java/jdk9" and your path includes "c:/java/jdk8/bin". In this situation java --version will give you 1.8.x.x.

JAVA_HOME is used by processes that forks to a new subproces and then used that JAVA_HOME value.

In your situation there is probably only a spacer missing in/after the call to hadoop-env.cmd ?? (not clear with the current info)

Jasper Huzen
  • 1,513
  • 12
  • 26