2

I am trying to open a Folder called Images within my resource folder, however it is returning null.

ClassLoader loader = Thread.currentThread().getContextClassLoader();

URL url = loader.getResource("Images");

File f1 = new File(url.toString());

When looking deeper into the issue I see that when calling f1.canRead() is returning false. When I looked up the file permissions it says that the folder has "Full control" Access. I made sure that the resource folder is "marked as resource folder" in Intellij. Any advice is appreciated. A link to the full code can be found here https://github.com/Software-Engineering-Final-Project/articleFetch/blob/master/src/main/java/com/articlefetch/app/Busniess/Service/ImageServiceImpl.java

CrazyCoder
  • 389,263
  • 172
  • 990
  • 904

0 Answers0