java.io.FileNotFoundException, file not being found -


i wanted read file line line. meant simple, can't right!

string filename = "c:/users/diogo/desktop/krs_grafo/graph.txt"; filereader file = new filereader(filename); bufferedreader inputstream = new bufferedreader(file); system.out.println(inputstream.readline()); 

i keep getting error:

exception in thread "main" java.io.filenotfoundexception: c:\users\diogo\desktop\krs_grafo\graph.txt (o sistema não pode encontrar o arquivo especificado) @ java.io.fileinputstream.open(native method) @ java.io.fileinputstream.<init>(fileinputstream.java:120) @ java.io.fileinputstream.<init>(fileinputstream.java:79) @ java.io.filereader.<init>(filereader.java:41) @ krs_grafo.krs_grafo.main(krs_grafo.java:51) java result: 1 

the system cant find file, i'm sure hell there! i'm using netbeans 7.0 on windows 7.

any suggestions?

as said in comments, searching "graph" , not "graph.txt". previous execution tried without extension. so, edited coherent. still doesn't work.

the problem here file name "graph.txt.txt" wich couldn't see because the extensions hidden.

thanks user "michael brewer-davis" asked in comments "output of cd , dir in given directory".

also point out either / , \\ work fine.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -