title: sbt.bat for windows
body: <p>I'm new to Scala.</p>
  
  <p>I just installed <a href="http://www.scala-sbt.org/download.html" rel="nofollow">sbt for windows MSI</a></p>
  
  <p>I have a project with build.sbt</p>
  
  <p>I opened a windows console in the current project folder.</p>
  
  <p>I runned the sbt.bat</p>
  
  <p>I turned @echo on to get the error message.</p>
  
  <pre><code>C:\MasseGuillaume-Scala99-1879ed7&gt;sbt
  
  C:\MasseGuillaume-Scala99-1879ed7&gt;set SBT_HOME=C:\MasseGuillaume-Scala99-1879ed7
  \
  
  C:\MasseGuillaume-Scala99-1879ed7&gt;set ERROR_CODE=0
  
  C:\MasseGuillaume-Scala99-1879ed7&gt;rem We use the value of the JAVACMD environmen
  t variable if defined
  
  C:\MasseGuillaume-Scala99-1879ed7&gt;set _JAVACMD=
  
  C:\MasseGuillaume-Scala99-1879ed7&gt;if "" == "" (if not "" == "" (if exist "\bin\j
  ava.exe" set "_JAVACMD=\bin\java.exe" ) )
  
  C:\MasseGuillaume-Scala99-1879ed7&gt;if "" == "" set _JAVACMD=java
  
  C:\MasseGuillaume-Scala99-1879ed7&gt;rem We use the value of the JAVA_OPTS environm
  ent variable if defined
  
  C:\MasseGuillaume-Scala99-1879ed7&gt;set _JAVA_OPTS=
  
  C:\MasseGuillaume-Scala99-1879ed7&gt;if "" == "" set _JAVA_OPTS=-Xmx512M -XX:MaxPer
  mSize=256m -XX:ReservedCodeCacheSize=128m -Dsbt.log.format=true
  
  C:\MasseGuillaume-Scala99-1879ed7&gt;"java" -Xmx512M -XX:MaxPermSize=256m -XX:Reser
  vedCodeCacheSize=128m -Dsbt.log.format=true  -cp "C:\MasseGuillaume-Scala99-1879
  ed7\jansi.jar;C:\MasseGuillaume-Scala99-1879ed7\sbt-launch.jar;C:\MasseGuillaume
  -Scala99-1879ed7\classes" SbtJansiLaunch
  '"java"' n'est pas reconnu en tant que commande interne
  ou externe, un programme exécutable ou un fichier de commandes.
  
  C:\MasseGuillaume-Scala99-1879ed7&gt;if ERRORLEVEL 1 goto error
  
  C:\MasseGuillaume-Scala99-1879ed7&gt;set ERROR_CODE=1
  
  C:\MasseGuillaume-Scala99-1879ed7&gt;exit /B
  </code></pre>
  
  <p>the error is in this line :</p>
  
  <pre><code>"%_JAVACMD%" %_JAVA_OPTS% %SBT_OPTS% -cp "%SBT_HOME%jansi.jar;%SBT_HOME%sbt-launch.jar;%SBT_HOME%classes" SbtJansiLaunch %*
  </code></pre>
  
  <p>What should I add to fix it ? The error says that it's Java is not recognized as an internal or an external command or programm. </p>
  
  <p>I just don't get the message error. If I put the sbt.bat and jansi.jar and sbt-launch.jar in the C:\Program Files (x86)\Java\jre6\bin and i run the batch file, it's working.</p>
  
  <p>Any solutions ?</p>