Hello forum, Im having some trouble reading a .in file for a project with the Eclipse SDK. Heres the code (Its an old competition problem thats why the names wierd).
File inFile = new File("ZEclipse Projects/Problem 1 Floating Mountains/01.in");
Scanner sc = new Scanner(inFile);
Its throwing a File not Found exception even though the file is right there. I tried creating a .txt file to see if that will work and named it A01.txt and even then it just cant FIND it. I ran a line to see where it reads and its IS reading the correct location.
So, from what I can tell it cant find a file when it is in the correct place, and the correct name. I have no clue whats wrong, and really appreciate it if anyone can help out. We have wasted 2 class periods on this doing everything from changing file names to switching file locations to recreating the project folder.
Thanks,
Crazzydude
File inFile = new File("ZEclipse Projects/Problem 1 Floating Mountains/01.in");
Scanner sc = new Scanner(inFile);
Its throwing a File not Found exception even though the file is right there. I tried creating a .txt file to see if that will work and named it A01.txt and even then it just cant FIND it. I ran a line to see where it reads and its IS reading the correct location.
So, from what I can tell it cant find a file when it is in the correct place, and the correct name. I have no clue whats wrong, and really appreciate it if anyone can help out. We have wasted 2 class periods on this doing everything from changing file names to switching file locations to recreating the project folder.
Thanks,
Crazzydude