title: Running java script with bat, "java is not recognized as an internal command or external command"
body: <p>Ok Guys Thank you for trying to debug me.</p>
  
  <p>I have a java script that i usually compile with this cmd</p>
  
  <pre><code>javac -classpath jxl.jar;..C:\3DWIP\src\; GenerateExcel.java
  </code></pre>
  
  <p>then I run it with this cmd.</p>
  
  <pre><code>java -classpath jxl.jar;..C:\3DWIP\src\; GenerateExcel Model.STEPFILE
  </code></pre>
  
  <p>jxl.jar being the JExcelAPI for writing an EXCEL file and C:\3DWIP\src\ is the folder where my Main() would be.</p>
  
  <p>This works perfectly.</p>
  
  <p>My problem is that I have a bat script that at some point is supposed to call the javac and the java and for example when it calls the following line
      java -classpath jxl.jar;..C:\3DWIP\src\; GenerateExcel Model.STEPFILE</p>
  
  <p>I get the famous "java is not recognized as an internal command or external command".</p>
  
  <p>This is my system path variables </p>
  
  <pre><code>C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Java\jdk1.7.0_67\bin;C:\3DWIP\src;C:\Program Files\Java\jdk1.7.0_67\lib\jexcelapi\jxl.jar;%JAVA_HOME%\bin
  </code></pre>
  
  <p>This is my bat script</p>
  
  <pre><code>@echo off
  
  set INPUTFILENAME=%~1
  set INPUTFILENAME=%INPUTFILENAME:C:\GENERATOR\=%
  set CTWORKFLD=C:\GENERATOR\
  set CTINSTDIR=C:\coretechnologie2014\evolution64
  set CTSCRIPTFLD=C:\coretechnologie2014\evolution64\scripts
  set CTLIBPATH=C:\coretechnologie2014\evolution64\lib64
  set EVOLPATH=%CTINSTDIR%
  set path=C:\Program Files\Java\jdk1.7.00_67\bin;%EVOLPATH%;%CTLIBPATH%;%CTLIBPATH%\lib3dx\intel_a\code\bin;%UGII_ROOT_DIR%;
  
  rmdir %CTWORKFLD%\out /s /q
  
  mkdir %CTWORKFLD%\out
  
  echo Processing file: %INPUTFILENAME%
  
  echo Exporting Images and Data 
  "%CTINSTDIR%\evolution.exe" -batch "%CTSCRIPTFLD%\Compute_Properties_and_views.scp"     "%CTWORKFLD%\%INPUTFILENAME%" Evolution Step "%CTWORKFLD%\out\%INPUTFILENAME%" "%CTWORKFLD%\out\%INPUTFILENAME%.stp.log"
  
  echo Exporting Done!
  
  echo Generating Excel File
  
  chdir /d C:\3DWIP\src
  ::javac -classpath C:\Program Files\Java\jdk1.7.0_67\bin;..jxl.jar;..C:\3DWIP\src\; GenerateExcel.java 
  java -classpath C:\Program Files\Java\jdk1.7.0_67\bin;..jxl.jar;..C:\3DWIP\src\; GenerateExcel %INPUTFILENAME%
  
  
  echo Closing 1000 secs... 
  "%windir%\system32\timeout.exe" /t 1000 /nobreak
  echo Job Done!
  
  
  @echo  
  @echo  
  </code></pre>
  
  <p>Pls help I duno what to do anymore.</p>