[
https://issues.apache.org/jira/browse/HADOOP-9600?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13696194#comment-13696194
]
Ivan Mitic commented on HADOOP-9600:
------------------------------------
Thanks Mostafa for reporting the problem and the patch.
I have one question on the patch:
{code}
+%JAVA% -Xmx32m %HADOOP_JAVA_PLATFORM_OPTS% -classpath "%CLASSPATH%"
org.apache.hadoop.util.PlatformName > %TEMP%\java_platforms.txt
+set /p JAVA_PLATFORM=<%TEMP%\java_platforms.txt
+del %TEMP%\java_platforms.txt
{code}
Will this work when we have concurrent invocations of cmd scripts?
My guess would be that we should be able to make the original/below line work
with some escaping. Will give this a try and report back
{code}
for /f "delims=" %%A in ('%JAVA% -Xmx32m %HADOOP_JAVA_PLATFORM_OPTS% -classpath
"%CLASSPATH%" org.apache.hadoop.util.PlatformName') do set JAVA_PLATFORM=%%A
{code}
The rest of the patch looks good.
> In Windows: Hadoop fails to run when JAVA_HOME has spaces in it
> ---------------------------------------------------------------
>
> Key: HADOOP-9600
> URL: https://issues.apache.org/jira/browse/HADOOP-9600
> Project: Hadoop Common
> Issue Type: Bug
> Environment: Windows
> Reporter: Mostafa Elhemali
> Assignee: Mostafa Elhemali
> Attachments: HADOOP-9600.2.patch, HADOOP-9600.3.patch,
> HADOOP-9600.4.patch, HADOOP-9600.5.patch, HADOOP-9600.patch
>
>
> hadoop-config.cmd misbehaves when JAVA_HOME has spaces in it (e.g. if Java is
> in c:\Program Files).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira