title: Classpath invalid flag - Java
body: <p>I am using <code>javac</code> to compile a file called <code>Rengine.jar</code>. </p>
  
  <p>I tried:</p>
  
  <pre><code>javac –classpath ./REngine.jar
  javac –cp ./REngine.jar
  javac ./REngine.jar
  javac –classpath REngine.jar
  </code></pre>
  
  <p>And here are the errors that I got:</p>
  
  <hr>
  
  <pre><code>javac: invalid flag: –classpath
  Usage: javac &lt;options&gt; &lt;source files&gt;
  use -help for a list of possible options
  </code></pre>
  
  <hr>
  
  <pre><code>javac: invalid flag: –cp
  Usage: javac &lt;options&gt; &lt;source files&gt;
  use -help for a list of possible options
  </code></pre>
  
  <hr>
  
  <pre><code>javac: invalid flag: ./REngine.jar
  Usage: javac &lt;options&gt; &lt;source files&gt;
  use -help for a list of possible options
  </code></pre>
  
  <hr>
  
  <pre><code>javac: invalid flag: –classpath
  Usage: javac &lt;options&gt; &lt;source files&gt;
  use -help for a list of possible options
  </code></pre>
  
  <p>I am not familiar with Java at all and I could not find an answer to this problem with a Google search. I precise that I am in the good directory and that I am using Mac OSX. My Java version is 1.8.0_20.
  Any advice would be much appreciated! :)</p>