title: Java FileNotFoundException in jar file
body: <p>I’m working on a background Spring service that runs from the command line using a nohup command.</p>
  
  <p>I’m hitting the following error:</p>
  
  <pre><code>java.io.FileNotFoundException: class path resource [templates/] cannot be resolved to absolute file path because it does not reside in the file system: jar:file:/Users/gestes/Documents/workspace/bge/bge-proj/myProcess/target/myProcess-0.2.2.jar!/templates/
  </code></pre>
  
  <p>The jar file is being created and does exist at:</p>
  
  <pre><code>/Users/gestes/Documents/workspace/bge/bge-proj/myProcess/target/myProcess-0.2.2.jar
  </code></pre>
  
  <p>When I extract the jar file contents, there is a /templates/ directory.</p>
  
  <p>Looking at the exception, there is an “ ! “ after the jar file name, and I thought that tells what it can’t find, but clearly, it is there.</p>
  
  <p>What am I missing?</p>