I have a gradle project with app.properties file present in the src/main/resources folder.
When i am trying to execute the project using jar, it says not able to read the app.properties file specified.
Below is the code to read the properties file :
Properties properties = new Properties();
File file = new File("src/main/resources/app.properties");
FileInputStream inputStream = new FileInputStream(file);
properties.load(inputStream);
I am using below command to run the jar :
Java -jar App.jar
Any help on this issue will be appreciated.