title: Load resource from anywhere in classpath
body: <p>I have a simple java application that loads a properties file from the current package.</p>
  
  <pre><code>this.getClass().getResourceAsStream("props.properties");
  </code></pre>
  
  <p>This works fine when the property file I want is in the current package. However, I want to package this application as a JAR and define and override with a new properties file where I use it. Is there a way to load the first resource named "props.properties" that is on the classpath?</p>
  
  <p>I want it to be as easy to override the properties file via command line:</p>
  
  <pre><code>java.exe -classpath props.properties;myJar.jar com.test.MyApp
  </code></pre>
  
  <p>I don't want to have to unpack the JAR and modify the properties file to change something. I feel like I'm missing something obvious...</p>