title: jboss: accessing file resource through java code?
body: <p>I am reading properties file from java DAO implementation for loading properties object as in code given below </p>
  
  <pre><code>    this.getErrorproperties().load(
                  new FileInputStream(new File("").getAbsolutePath()
                          + "/conf/error/error.properties"));
  </code></pre>
  
  <p>While testing it works fine but when i try to deploy application on jboss 5 server. application deployment fails because absolute path is considered to be bin directory of jboss.</p>
  
  <p>I want Jboss to find it relative to path of ear file. One more problem i face is my path relative to home path of project or ear file will be different for first and later.</p>
  
  <p>Please suggest current approach programmers follow for such scenario. (I am a fresher)  </p>