SampleClass.java and keywords.properties are present in this location in my system :
/home/user/Projects/SampleProject/src/main/java/com/package/subPackage/
SampleClass.java have both static and non-static functions.
In static function ClassLoader.getSystemResourceAsStream(FILE_PATH)
In non-static function this.getClass().getClassLoader().getResourceAsStream(FILE_PATH)
But It returns null in InputStream.I tried every possible combination for FILE_PATH like this :
/home/user/Projects/SampleProject/src/main/java/com/package/subPackage/prefix.properties
src/main/java/com/package/subPackage/prefix.properties
com/package/subPackage/prefix.properties
prefix.properties
I followed these links
getResourceAsStream() vs FileInputStream
http://viralpatel.net/blogs/loading-java-properties-files/
Nothing worked for me . Please suggest me where am I doing wrong?