From 4d51abbcff8e7d96dbdfe72f19a9658ca6abf083 Mon Sep 17 00:00:00 2001 From: wayneseguin Date: Wed, 26 Aug 2020 11:52:30 -0400 Subject: [PATCH] Update hadoop-env.cmd Added line to convert %JAVA_HOME% to short paths, in case the installation directory contains a space. Current installers suggest using \Program Files\Java, so everyone using Windows keeps running into problems trying to launch Hadoop. --- .../hadoop-common/src/main/conf/hadoop-env.cmd | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hadoop-common-project/hadoop-common/src/main/conf/hadoop-env.cmd b/hadoop-common-project/hadoop-common/src/main/conf/hadoop-env.cmd index 159840a104b..1349ffe7724 100644 --- a/hadoop-common-project/hadoop-common/src/main/conf/hadoop-env.cmd +++ b/hadoop-common-project/hadoop-common/src/main/conf/hadoop-env.cmd @@ -24,6 +24,9 @@ @rem The java implementation to use. Required. set JAVA_HOME=%JAVA_HOME% +@rem In case path contains spaces, convert JAVA_HOME to short paths +for %%I in ("%JAVA_HOME%") do set JAVA_HOME=%%~sI + @rem The jsvc implementation to use. Jsvc is required to run secure datanodes. @rem set JSVC_HOME=%JSVC_HOME%