Java tutorial
import java.nio.charset.StandardCharsets; import java.nio.file.FileSystems; import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner scanner = new Scanner(FileSystems.getDefault().getPath("logs", "access.log")); System.out.println(scanner.nextLine()); scanner.close(); } }