I have a properties file stored within /resources folder in my java Project.

Here is my code:
String fileName = "config.properties";
try (InputStream input = Main.class.getClassLoader().getResourceAsStream(fileName)) {
if (input == null) {
System.out.println("Sorry, unable to find " + fileName);
return properties;
}
properties = new Properties();
properties.load(input);
when I run the code in my IDE it works as intended... but when I export the project as an "runnable Jar file" and run the application using: java -jar <nameOfJar>.jar
Here is the resource folder present in the JAR file:

Can someone please explain to me why I can't read/load the properties file when it's converted to an executable JAR? Am I using the wrong file name?

