I'm attempting to read a .txt file and appending it to an ArrayList. It seems to fail at the Scanner line with 'java.io.FileNotFoundException: /raw/words.txt: open failed: (No such file or directory)'. I've tried BufferReader method and changing the location of the file with little success. Why is it not recognizing the file?
public void openFile (){
    File file = new File("raw/words.txt");
    ArrayList<String> names = new ArrayList<String>();
    try{
    Scanner in = new Scanner (file);
    while (in.hasNextLine()){
        names.add(in.nextLine());
    }
    }
    catch (Exception e){
    e.printStackTrace();
    }
    Collections.sort(names);
    for(int i=0; i<names.size(); ++i){
        System.out.println(names.get(i));
    }
}
 
     
    