input a directory to java to be proceed : > I have a problem in here, whenever I entered the directory path that I copy from my computer to input a txt file to my program it always said that the file is not found. is there something wrong from my code?



		System.out.println("insert directory file = ");
			FileReader file = null;
			try {
				file = new FileReader(input.next());				
				BufferedReader readfile = new BufferedReader(file);				 
				StringBuffer sb = new StringBuffer();

		try {
			while ((text = readfile.readLine()) != null) {
				sb.append(text);
				sb.append("\n");
			}
			readfile.close();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		text = sb.toString();
		//System.out.println(text);
		System.out.println("Data entered");
		System.out.println("Data length = "+text.length()+"\n");
			} catch (FileNotFoundException e1) {
				// TODO Auto-generated catch block
				System.out.println("File not found. Pease insert the proper file directory.\n");
			}