I have created a new folder in "scr" with the name "resources". There I have put my file "Test.txt". Now I would like to read in this file with a BufferedReader. This is my current code:
ClassLoader classLoader = getClass().getClassLoader();
File file = new File(classLoader.getResource("/resources/Test.txt").getFile());
in = new BufferedReader(new FileReader(file));
But it doesn't work! The file is not found. Why?