This piece of code down below, where I take my file from folder which is inside the \"/resource\" folder, works fine for me in Java 8:
//e.g fileName =
In the module_info.java file, you have to open the files, for example, the package name, in which you have the files is "resources" and, if that package is inside another called "resources_module" the code will be:
exports resources_module;
opens resources;
opens resources.(the name of another folder inside the package);
And now you can access to that folder.
HOW TO ACCESS TO RESOURCES FROM ANOTHER CLASS
From another class (including other modules), to get an InputStream
you have to call the class you created before (the empty class) like this:
(Your empty class).class.getResourceAsStream(path);