3 Replies - 28796 Views - Last Post: 30 October 2008 - 02:11 PM Rate Topic: -----

#1 ELTON  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 27-October 08

"The system cannot find the file specified" !?

Posted 30 October 2008 - 01:45 PM

Hello.
When I run the code I get the following error message:
java.io.FileNotFoundException: (The system cannot find the file specified)
import java.io.*;
public class readf {

	public static void main(String[] args) throws IOException {
		try {
	  BufferedReader reader = new BufferedReader(new
FileReader("C:/abc.txt"));
	  System.out.println(reader.readLine());
	} catch (IOException e) {
	  System.out.println(e);
	} 

	
	}
}




I am sure from this cases:
. file is existing.
.file is in the correct directory.

This post has been edited by ELTON: 30 October 2008 - 01:46 PM


Is This A Good Question/Topic? 0
  • +

Replies To: "The system cannot find the file specified" !?

#2 g00se  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 2657
  • View blog
  • Posts: 11,214
  • Joined: 20-September 08

Re: "The system cannot find the file specified" !?

Posted 30 October 2008 - 01:48 PM

Please post the output of command line

dir C:\abc.txt
Was This Post Helpful? 0
  • +
  • -

#3 ELTON  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 27-October 08

Re: "The system cannot find the file specified" !?

Posted 30 October 2008 - 02:02 PM

View Postg00se, on 30 Oct, 2008 - 01:48 PM, said:

Please post the output of command line

dir C:\abc.txt



Thank you very much,

I found the problem :D .I named the file "abc.txt" when I create it and the system automaticly set the format of the file then the file name become "abc.txt.txt" :D :D
Was This Post Helpful? 0
  • +
  • -

#4 g00se  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 2657
  • View blog
  • Posts: 11,214
  • Joined: 20-September 08

Re: "The system cannot find the file specified" !?

Posted 30 October 2008 - 02:11 PM

No problem
Was This Post Helpful? 1

Page 1 of 1