Reputation: 45
I have tried everything i have seen. Made sure the correct JDK was installed, made sure the txt file was in the correct working directory but nothing. I keep getting the no such file exception. And this is not the only project that i am working on that is giving me this problem. I dont know what the problem is:
Upvotes: 0
Views: 2008
Reputation: 1367
When run in IDEA the following code shows that your working directory is a project directory, not the src
one:
public class Main {
public static void main(String[] args) {
System.out.println("CWD: " + System.getProperty("user.dir"));
}
}
Which means you should do one of the following:
PS: JDK has nothing to do with it
Upvotes: 1