I am using the following code to read a properties file:
Properties pro = new Properties(); InputStream is = Thread.currentThread().getContextClassLoader().
I had the same problem and I have resolved by doing the following
File file = new File("resources.properties");
System.out.println(file.getAbsolutePath());
and then put "resources.properties" file under that path.