"The system cannot find the file specified" [message #175807] |
Sun, 29 August 2004 15:40  |
Eclipse User |
|
|
|
Originally posted by: peng.cs.unt.edu
I have a project 'Test' with 2 files:
1. E:\workspace\test\src\Test.java (code listing see below)
2. E:\workspace\test\src\abc.txt
When I use "Run As Java Application", I got an error message:
"java.io.FileNotFoundException: abc.txt
(The system cannot find the file specified)"
If I move abc.txt to E:\workspace\test\abc.txt, it will succeed.
Could you tell me how to set up Eclipse so that I don't need to move
my resource files (keep them in src folder)?
Thanks.
>>>>>>Here is my Test.java:
import java.io.*;
public class Test {
public static void main(String[] args) {
try {
BufferedReader reader = new BufferedReader(new
FileReader("abc.txt"));
System.out.println(reader.readLine());
} catch (IOException e) {
System.out.println(e);
}
}
}
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03613 seconds