PropertyResourceBundle prs = new PropertyResourceBundle( Thread.currentThread( ).getContextClassLoader( ).getResourceAsStream( "my.properties" ) );
or add a / on the file name if it is on the files system (bin directory).
Thanks so much, getting a PropertyResourceBundle as you describe works well. The initial slash in front of my properties file name didn't help. It seems that loading Properties isn't as straight-forward as it should/could be with JBoss. Can it even be done at all ? If so can someone post the code or the configuration required ?
try this (file in /jboss/bin/):
ClassLoader loader = Thread.currentThread().getContextClassLoader();
InputStream is = loader.getResourceAsStream("my.properties");
java.net.URL url =
myProps = new java.util.Properties();