0

enter image description here

Hi, I'm trying to call a file named "sample-lite.json" to my main Driver class.

I created a folder named "data" within the "resources" folder that was automatically created when I first started the project with Maven and put the JSON files into the "data" folder.

However, I get FileNotFoundException even though Intellij's auto-filling correctly provided the right path to my JSON file.

Strangely, when I moved my JSON files directly under "src" folder, everything works as intended.

I also checked the Project Structure of my project but the "resources" folder is correctly indicated in the content root.

How can I safely call my JSON files while keeping them under the "resources" folder?

mushjoon
  • 11
  • 3

0 Answers0