how to read from src main resources the folder in java code example
Example 1: java resource file
File file = new File(
getClass().getClassLoader().getResource("database.properties").getFile()
);
Example 2: java resource file
InputStream inputStream = getClass()
.getClassLoader().getResourceAsStream("database.properties");