I have a file named InputFile.txt in a resources folder. My project structure is like this:
- VirtualMemory
- src
- resources
- InputFile.txt
- VirtualMemory
- VirtualMemory.java
- resources
- src
And I am trying to access the InputFile.txt in VirtualMemory.java class by like this:
String filename = ("./src/resources/InputFile.txt");
File file = new File(filename);
But the file is not being found. How to resolve this problem?