I have a project me and my friends were working on. we initialized the project in Intellij using Gradle. when I try to run the program in vsc it gives an error. the cause of this error I believe is VSC cannot detect the resource folder where a part of the program needs to read to get input from. for some context here is the method:
public void importTOF(String filename) {
try (Scanner fileReader = new Scanner(Paths.get("src/main/resources/"+filename))) {
ArrayList<String> lines = new ArrayList<>();
while (fileReader.hasNextLine()) {
lines.add(fileReader.nextLine());
}
//the rest of the method
}
after tinkering around with the file location I found out that the project can run if I move the file into the /project-name/ directory. is there any way I can make vsc read the file in the src/main/resources directory?
