title: Error Hadoop on Windows via Cygwin: Could Not Locate null\bin\winutils.exe
body: <p>When I set <strong>HADOOP_HOME=/cygdrive/c/ecosystem/hadoop-2.5.1</strong> and then attempt to run <strong>bin/hadoop fs</strong> or <strong>bin/hadoop hadoop-streaming.jar</strong> from Cygwin, I receive the following error:</p>
  
  <pre><code>    ERROR [main] util.Shell (Shell.java:getWinUtilsPath(373)) - Failed to locate the winutils binary in the hadoop binary path
  java.io.IOException: Could not locate executable null\bin\winutils.exe in the Hadoop binaries.
          at org.apache.hadoop.util.Shell.getQualifiedBinPath(Shell.java:355)
          at org.apache.hadoop.util.Shell.getWinUtilsPath(Shell.java:370)
          at org.apache.hadoop.util.Shell.&lt;clinit&gt;(Shell.java:363)
          at org.apache.hadoop.util.GenericOptionsParser.preProcessForWindows(GenericOptionsParser.java:432)
          at org.apache.hadoop.util.GenericOptionsParser.parseGeneralOptions(GenericOptionsParser.java:478)
          at org.apache.hadoop.util.GenericOptionsParser.&lt;init&gt;(GenericOptionsParser.java:170)
          at org.apache.hadoop.util.GenericOptionsParser.&lt;init&gt;(GenericOptionsParser.java:153)
          at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:64)
          at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
          at org.apache.hadoop.fs.FsShell.main(FsShell.java:340)
  Exception in thread "main" java.lang.RuntimeException: core-site.xml not found
          at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2269)
          at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2195)
          at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:2112)
          at org.apache.hadoop.conf.Configuration.set(Configuration.java:989)
          at org.apache.hadoop.conf.Configuration.set(Configuration.java:961)
          at org.apache.hadoop.conf.Configuration.setBoolean(Configuration.java:1299)
          at org.apache.hadoop.util.GenericOptionsParser.processGeneralOptions(GenericOptionsParser.java:319)
          at org.apache.hadoop.util.GenericOptionsParser.parseGeneralOptions(GenericOptionsParser.java:479)
          at org.apache.hadoop.util.GenericOptionsParser.&lt;init&gt;(GenericOptionsParser.java:170)
          at org.apache.hadoop.util.GenericOptionsParser.&lt;init&gt;(GenericOptionsParser.java:153)
          at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:64)
          at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
          at org.apache.hadoop.fs.FsShell.main(FsShell.java:340)
  </code></pre>
  
  <p>I can access <strong>bin/hadoop version</strong> along with <strong>classpath</strong> and most other commands. I thought that maybe I needed a Windows style path so that it could conform to the \bin\winutils style. So, I set <strong>HADOOP_HOME=c:\ecosystem\hadoop-2.5.1</strong> and this error went away. However, now I receive a link error when running in Cygwin. I tested hadoop with <strong>HADOOP_HOME=c:\ecosystem\hadoop-2.5.1</strong> via Windows Command, and I can run a MapReduce job without issue. </p>
  
  <p>I want to successfully run hadoop in Cygwin, and I don't want to deal with link errors. If I keep <strong>HADOOP_HOME=/cygdrive/c/ecosystem/hadoop-2.5.1</strong>, is there any way that I can set hadoop-config or some other file to look for the Windows style path if the Cygwin path fails or is null? Maybe something like this in hadoop-config:</p>
  
  <pre><code>if ["$HADOOP_HOME" = ""]; then
    HADOOP_HOME=$(cygpath -w "$HADOOP_HOME")
  fi
  </code></pre>
  
  <p>Obviously this particular code didn't work in hadoop-config, but I suppose you'll get the general idea. Any help would be appreciated. </p>