title: Daemon not running. starting it now on port 5037 * Cannot open 'nul': The system cannot find the file specified
body: <p>Eclipse gives following error while running android program... </p>
  
  <p><strong>Error 1:</strong> </p>
  
  <pre><code>[2015-12-10 16:10:37 - adb] Cannot open 'nul': The system cannot find the file specified. (2)
  [2015-12-10 16:10:37 - ddms] 'D:\android-sdk-windows\platform-tools\adb.exe,start-server' failed -- run manually if necessary
  [2015-12-10 16:10:37 - adb] * failed to start daemon *
  [2015-12-10 16:10:37 - adb] error: cannot connect to daemon
  </code></pre>
  
  <p>And when I start from command line I get this error...</p>
  
  <p><strong>Error 2:</strong></p>
  
  <pre><code>D:\android-sdk-windows\platform-tools&gt;adb start-server
  * daemon not running. starting it now on port 5037 *
  Cannot open 'nul': The system cannot find the file specified. (2)
  * failed to start daemon *
  error: cannot connect to daemon
  </code></pre>
  
  <p>Previously even <code>AVD Manager.exe</code> and <code>SDK manager.exe</code> was not opening  when I double click on it. After doing Rnd on google I found this post    <a href="https://stackoverflow.com/questions/5199811/android-sdk-manager-wont-open#">Android SDK manager won&#39;t open</a> and I made changes to android.bat as follow :</p>
  
  <p>I replace this </p>
  
  <pre><code>rem Check we have a valid Java.exe in the path.
  set java_exe=
  call lib\find_java.bat
  if not defined java_exe goto :EOF
  </code></pre>
  
  <p>with this code </p>
  
  <pre><code>set java_exe=C:\Program Files\Java\jdk1.7.0_75\bin\java.exe
  </code></pre>
  
  <p>Now when I double click on <code>AVD Manager.exe</code> and <code>SDK manager.exe</code> it opens well.</p>
  
  <p>I also checked with new eclipse (Mars) and added ADT plug in and created Hello World Application and tried to run but its gives same <strong>Error 1</strong> </p>
  
  <p>Update 2:</p>
  
  <p>I get below error..</p>
  
  <pre><code>D:\&gt;set ADB_TRACE=adb
  
  D:\&gt;adb start-server
  adb I  6072  2636 adb.cpp:219] Android Debug Bridge version 1.0.32
  adb I  6072  2636 adb.cpp:219] Revision 09a0d98bebce-android
  adb I  6072  2636 adb.cpp:219]
  adb I  6072  2636 adb_client.cpp:126] _adb_connect: host:version
  adb I  6072  2636 sysdeps_win32.cpp:742] could not connect to tcp:5037: cannot c
  onnect to 127.0.0.1:5037: No connection could be made because the target machine
   actively refused it. (10061)
  adb I  6072  2636 adb_client.cpp:175] adb_connect: service host:start-server
  * daemon not running. starting it now on port 5037 *
  Cannot open 'nul': The system cannot find the file specified. (2)
  * failed to start daemon *
  error: cannot connect to daemon
  </code></pre>
  
  <p>I checked whether port 5037 is used by other program but it is not showing </p>
  
  <pre><code>netstat -aon|findstr 5037
  </code></pre>
  
  <p>What is error exactly..system refused connection on port 5037 what does it mean  how to resolve it. Can you please help me?</p>