It could be little late still this could help many other. These are ways to access the resources available in the project
Getting resources form the default package
// Getting Resource as file object
File f = new File(getClass().getResource("/excludedir.properties").getFile());
// Getting resource as stream object
InputStream in = getClass().getResourceAsStream("/excludedir.properties");
Getting resources from specific packages
// Getting Resource as file object
File f = new File(getClass().getResource("/com/vivek/core/excludedir.properties").getFile());
// Getting resource as stream object
InputStream in = getClass().getResourceAsStream("/com/vivek/core/excludedir.properties");
Note : getclass() is a non-static function which cannot be called form the static context. If you want to call from the static context use
YourClassName.class.getResource("/com/vivek/core/excludedir.properties").getFile()
Hope this helps. Cheers!!