how can I find a .properties file from a class deployed in a jar/war/ear without coding any absolute path informations into the source? Note that the class in question does not have to be an EJB, but will be loaded/used/referenced by one...
You can use your classes ClassLoader to find your property files.
Properties p = new Properties();
InputStream in = yourclass.getClassLoader().getResourceAsStream("my.properties");
//If the resource is not found , null is returned.
if( in != null)
If you don't want to 'hard code' the properties file name,
set it up as an environment entry the respective deployment descriptor.