Hi there,
I have an application that I deployed as a folder in JBOSS. It contains a jar file and a "conf" directory which contains a properties file. However, I just can't load the properties file in my code. I also tried to put the properties file at the top level of the jar file, meaning just inside the jar file. But
InputStream input = this.getClass().getResourceAsStream("xxxx.properties") ;
still fails. I have played with different paths, but none of them work.
Can somebody help me out? How do I load my own properties file in JBOSS? I saw an earlier post suggesting putting the properties file in /bin directory. But I do want to keep it inside my deployment package. Any suggestions?
Thanks.
Read the javadocs.
package foo.bar;
public class Whatever
{
getResource("xxxx.properties");
}
tries to load
/foo/bar/xxxx.properties
Regards,
Adrian