title: Properties getProperty returning null
body: <p>I'm having the following problem. I'm using Java properties to read some info of a file, but when I call <code>prop.getProperty("var")</code> it returns <code>null</code>. I ran out of ideas. Here is the code I have.</p>
  
  <pre><code>static final Properties prop = new Properties();
  public JConnection(){
      try{
          prop.load(new FileInputStream("db.properties"));
      }catch(Exception e){
          logger.info("file not found.");
          e.printStackTrace();
      }
  }
  </code></pre>
  
  <p>I never get the error message "file not found".</p>
  
  <pre><code> public static Connection getConnection(String conType) {
      Connection conn;
      try {
          Class.forName("oracle.jdbc.driver.OracleDriver"); 
          if(model == "client"){
               conn = DriverManager.getConnection(prop.getProperty("url"),prop.getProperty("usr"),prop.getProperty("pass"));  
          }else{
              conn = DriverManager.getConnection(prop.getProperty("url1"),prop.getProperty("usr1"),prop.getProperty("pass1")); 
          }
      } catch (Exception ex) {            
          ex.printStackTrace();
          conn = null;
      }
  </code></pre>
  
  <p>When it tries to connect to the DB, <code>getProperty</code> is returning <code>null</code> as it is not found. Any ideas of what it could be or what I'm doing wrong?</p>