title: Get URL of file in .jar that the program is running
body: <p>Given hello.jar, which is compiled with maven, I want to access a resource located under folder/file.file. However I don't know how to get the URL of the current JAR I am in. Would</p>
  
  <pre><code>file://./folder/file.file
  </code></pre>
  
  <p>work correctly, or,</p>
  
  <pre><code>jar:file://./!hello.jar/folder/file.file
  </code></pre>
  
  <p>or is there an easier way to do this?</p>
  
  <p>(Sorry for the dumb question, I'm new to maven.)</p>