open file error.

This is my method:

privatestatic BufferedReader readFileWithBufferedReader(String filename){

FileInputStream fis =null;

InputStreamReader sr=null;

BufferedReader r=null;

try{

fis =new FileInputStream(filename);

}catch (FileNotFoundException ex){

ex.printStackTrace();

}//fis catch

try{

sr =new InputStreamReader(fis,"Cp866");

}catch (UnsupportedEncodingException ex){

ex.printStackTrace();

}//sr catch

br =new BufferedReader( sr);

return br;

}

The aim of it is to getBufferedReader

Then, I parse file.

The problem is:

If I send to methos filepath like : filename ="test.txt";

it reads file, but If I send to method filename ="d:\test.txt";

I do not get anything....no exceptions...no result...

What does it mean, can you give me some comments?

Where is a mistake?

[1770 byte] By [Holoda] at [2007-11-27 6:49:04]
# 1
try to replace both catch block from FileNotFoundException to Exception, this will allow u to see all the exception thrown by the block... try {// yr stuff here} catch (Exception e) {e.printStackTrace();}hope this help
JWKC-5ivea at 2007-7-12 18:22:38 > top of Java-index,Core,Core APIs...
# 2
The problem was in the other method.Everything is correct!Anyway, thank you for your help!
Holoda at 2007-7-12 18:22:38 > top of Java-index,Core,Core APIs...