Hello, I've just joined this community, and I'm a newbie learning Java at university.
I'm running the NetBeans IDE on a computer running windows XP and I'm having problems getting a java program to read files.
I keep getting the error:
java.io.FileNotFoundException: myfile (The system cannot find the file specified)
I also get this error when using an example that I know runs fine under java on debian:
( CodeCollapse )The file is in the same directory as the .java file, but whenever I execute the program in netbeans I get the following error:
java.io.FileNotFoundException: football.txt (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.
(FileInputStream.java:106)
at java.io.FileInputStream.(FileInputStream.java:66)
at java.io.FileReader.(FileReader.java:41)
at ReadFileApp.main(ReadFileApp.java:14)
Exception in thread "main"
Any help would be muchly appreciated. Thanks
Edit: All fixed - Thanks guys!