Snippet 1
File file = new File(
getClass().getClassLoader().getResource("database.properties").getFile()
);
Snippet 2
InputStream inputStream = getClass()
.getClassLoader().getResourceAsStream("database.properties");
Copyright © Code Fetcher 2020