Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » "The system cannot find the file specified"
"The system cannot find the file specified" [message #175807] Sun, 29 August 2004 19:40 Go to previous message
Eclipse UserFriend
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);
}
}
}
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic:[Bug] "Sort members" ignore dependancies between static variables.
Next Topic:New: how to set up a project with existing files
Goto Forum:
  


Current Time: Sun Oct 21 11:57:55 GMT 2018

Powered by FUDForum. Page generated in 0.11630 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top