title: How to include JAR files on a batch file
body: <p>This might be similar to <a href="https://stackoverflow.com/questions/18363577/including-jar-while-executing-java-from-bat-file">THIS</a> but I can't find a solution written there</p>
  
  <p>Problem is, I am running a java app thru a batch file which needs some jar files to be included. And I can't find a way to do it</p>
  
  <p>File locations:
  (java class)
  D:\workspace\src\MyClass.java</p>
  
  <p>(jars needed)
  D:\workspace\src\lib\opencsv-4.1.jar</p>
  
  <p>D:\workspace\src\lib\common-lang3.jar</p>
  
  <p>Current code on bat file:</p>
  
  <pre><code>@echo off
  set CLASSPATH=.
  set CLASSPATH=%CLASSPATH%;D:workspace\src
  set CLASSPATH=%CLASSPATH%;\lib\opencsv-4.1.jar
  set CLASSPATH=%CLASSPATH%;\lib\common-lang3.jar
  set ARGS=one two
  
  javac D:workspace\src\MyClass.java
  java -cp %CLASSPATH% MyClass %ARGS%
  
  pause
  </code></pre>
  
  <p>Please help on how to properly include these jar files to be able to run the program. Thanks </p>