title: Executable jar won't find the properties files
body: <p>I use this code in my program to load a properties file:</p>
  
  <pre><code>Properties properties = new Properties();
  URL url = new App().getClass().getResource(PROPERTIES_FILE);
  properties.load(url.openStream());
  </code></pre>
  
  <p>The code runs fine in Eclipse. Then I package the program into a JAR named MyProgram.jar, and run it, I got a NullPointerException at the second line. The JAR doesn't contain the properties file, they both are in the same directory. I am using Maven to create the JAR. How can I fix this problem?</p>
  
  <p>UPDATE: I don't want to add the properties file to the JAR, since it will be created at deployment time.</p>