Scanner sc = new Scanner(System.in); System.out.println("Please input the path:"); String path=sc.nextLine(); System.out.println("The input path is:"+path);