java - FileNotFoundException when reading file - No such file or directory -


i wondering if me catch wrong code?

path: src/dictionary.txt

code:

bufferedreader reader = new bufferedreader(new filereader("src\\dictionary.txt"));` 

error:

exception in thread "main" java.io.filenotfoundexception: src\dictionary (no such file or directory)     @ 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)     @ p26.wordreconstruction.generatedictionary(wordreconstruction.java:13)     @ p26.wordreconstruction.main(wordreconstruction.java:24) 

/src/dictionary.txt not same src/dictionary.txt. first in root second relative current directory.


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -