[ 
https://issues.apache.org/jira/browse/HADOOP-4776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12787761#action_12787761
 ] 

Peter Seegers commented on HADOOP-4776:
---------------------------------------

There's a simple fix for this issue. I'm working from v 0.20.1. If you change 
bin/hadoop so that the "cygwin path translation" block contains the line

 JAVA=`cygpath -u "$JAVA"`

the spaces are removed from the path to the java executable and all invocations 
of bin/hadoop work without the "C:\Program: command not found" message. See 
patch below ...

--- a/bin/hadoop        Tue Dec 08 12:09:18 2009 -0800
+++ b/bin/hadoop        Tue Dec 08 13:42:30 2009 -0800
@@ -247,6 +247,7 @@

 # cygwin path translation
 if $cygwin; then
+  JAVA=`cygpath -u "$JAVA"`
   CLASSPATH=`cygpath -p -w "$CLASSPATH"`
   HADOOP_HOME=`cygpath -w "$HADOOP_HOME"`
   HADOOP_LOG_DIR=`cygpath -w "$HADOOP_LOG_DIR"`

> Windows installation fails with "bin/hadoop: line 243: c:\Program: command 
> not found"
> -------------------------------------------------------------------------------------
>
>                 Key: HADOOP-4776
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4776
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: scripts
>    Affects Versions: 0.19.0
>         Environment: Windows
>            Reporter: m costello
>            Priority: Minor
>   Original Estimate: 0.17h
>  Remaining Estimate: 0.17h
>
> Perhaps a space in the path name is confusing Cygwin.   The JAVA_HOME path is 
> the default  "C:\Program Files\Java\jdk1.6.0_11".
> Changing
>   JAVA_PLATFORM=`CLASSPATH=${CLASSPATH} ${JAVA} 
> org.apache.hadoop.util.PlatformName | sed -e "s/ /_/g"`
> to
>   JAVA_PLATFORM=`CLASSPATH=${CLASSPATH} "${JAVA}" 
> org.apache.hadoop.util.PlatformName | sed -e "s/ /_/g"`
> appear to correct the problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to