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.
This commit is contained in:
wayneseguin 2020-08-26 11:52:30 -04:00 committed by GitHub
parent 931adbaa14
commit 4d51abbcff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -24,6 +24,9 @@
@rem The java implementation to use. Required. @rem The java implementation to use. Required.
set JAVA_HOME=%JAVA_HOME% 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 The jsvc implementation to use. Jsvc is required to run secure datanodes.
@rem set JSVC_HOME=%JSVC_HOME% @rem set JSVC_HOME=%JSVC_HOME%