title: Loading application properties in a Java desktop application
body: <p>What is the best way to store and load application level properties in Java.</p>
  
  <p>Is there anything simulare to .net where I would just put something in the app.config</p>
  
  <pre><code> &lt;appSettings&gt;
      &lt;add key="emailAddress" value="me@example.com" /&gt;
    &lt;/appSettings&gt;
  </code></pre>
  
  <p>And then retrieve it like this:</p>
  
  <pre><code>string AdminEmail = ConfigurationManager.AppSettings["emailAddress"];
  </code></pre>
  
  <p>Do I have to load properties files into file streams and such? seems like unnecessary work.</p>
  
  <p>I have tried this:</p>
  
  <pre><code>Properties props = new Properties();
  
  FileInputStream fis = new FileInputStream("myProps.properties");
  props.load(fis);
  fis.close();
  </code></pre>
  
  <p>But this is give me a java.io.FileNotFoundException exception. Where does the properties file need to go to in relation to the class?</p>