I have several paths to read into the program from txt format file. In order to simply the process, I would like to stored all the paths/directory into one txt file and assign values to each path.
TXT file:
C:/folder1/data
D:/folder2/excel
E:/folder3/doc
JAVA:
final String Local_dir = System.getenv().get("USERNAME")
String dir = FileUtils.readFileToString(new File("C:/Users/$Local_dir/Desktop/sample_paths.txt"), "UTF-8")
final String Path1 = dir.trim()
final String Path2 = dir.trim()
final String Path3 = dir.trim()
My question is how can I update the above code to make it work?