How do you scan a file with java that is not in the directory where the java file is located?
For example: a java file is located in the folder "C: \ Files \ JavaFiles \ test.java". However, the file I want to check is located in the folder "C: \ Data \ DataPacket99 \ data.txt"
Note. I already tried putting another Java file in the "C: \ Data" directory and using the test.java file as a class, but it does not work. It is still trying to scan from the "C: \ Files \ JavaFiles" directory.
source
share