title: Java Android Property file
body: <p>I am trying to load some data saved in my property file in an Android Application.</p>
  
  <p>I have put my property file under the src folder. Every time I try to load data from my file it keeps telling me FileNotFoundException open failed ENOENT (No such file or directory).</p>
  
  <p>My Code is as follows:</p>
  
  <p>This code is to save the file (new create)</p>
  
  <pre><code>      File file = new File("src/com/example/testphonegap/SilverAngel.properties");
        FileOutputStream fileOut = new FileOutputStream(file);
        properties.store(fileOut, "Properties");
        fileOut.close();
  </code></pre>
  
  <p>This code is to load data</p>
  
  <pre><code>    properties = new Properties();
      InputStream is = null;
  
       // First try loading from the current directory
      try {
          File f = new File("src/com/example/testphonegap/SilverAngel.properties");
          is = new FileInputStream(f);
  
          // Try loading properties from the file (if found)
          properties.load(is);
  
          GetPersonaliseSettings();
          GetUserSettings();
          GetFavSettings();
      }
      catch ( Exception e ) { 
          is = null; 
      }
  </code></pre>
  
  <p>Can you tell me what I am doing wrong please? Is it where the file is saved or am I missing something in my code?</p>