I try to read a .txt file line by line in my code, which I placed it just right under the /src/ directory, when I run it with test case or with static void main
/src/
Try File myFile = new File(workDir, file);
File myFile = new File(workDir, file);