I ma new to this so I am sorry if this is a stupid question. But please I need your help. I have the following directories in ecplise: Directory Hierarchy of course with a directory containing all these files.
I am trying to use get class.getResource to access a file called "data.txt" as such:
scanObj = new Scanner(new File(this.getClass().getResource("resources/data.txt").toExternalForm()));
But I am getting a null pointer exception why is that? Many thanks! Any help would be much appreciated