title: Error unable to access jarfile C:\Jar
body: <p>My jar file P2.jar (which has a main method and manifest file) is located in <code>C:\Jar Folder</code>. I tried to run it from cmd like this: </p>
  
  <p><code>C:SomeRandomFolder&gt; java -jar C:\Jar Folder\P2.jar</code></p>
  
  <p>I get the error:</p>
  
  <pre><code>unable to access jarfile C:\Jar
  </code></pre>
  
  <p>It works when I run it from the folder that the jar is in like this:</p>
  
  <pre><code>C:\Jar Folder&gt; java -jar P2.jar
  </code></pre>
  
  <p>Why can't I use the 1st command? Why do I have to go to the directory of my jar file?</p>