In case your class is present within your com.al.common.email.templates package, you can try using the below code:
Properties myProp = new Properties();
InputStream inStr = getClass().getResourceAsStream("demo.properties");
myProp.load(in);
inStr.close(); //Along with necessary exception handling
In case your class is present within your com.al.common.email.templates package, you can try using the below code:
InputStream inStr =
getClass().getResourceAsStream("/com/al/common/email/templates/demo.properties");
Providing the path in getResource() will help in searching for the resource in the relative directory.