File f = new File(path)
How to give the path parameter in this case?
You mean something like this?
URL resource = Thread.currentThread().getContextClassLoader().getResource("config.properties"); File f = new File(resource.toURI());