new FileInputStream(File file)
import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; public class Main { public static void main(String[] a) { File aFile = new File("C:/myFile.txt"); FileInputStream inputFile = null; try { inputFile = new FileInputStream(aFile); } catch (FileNotFoundException e) { e.printStackTrace(System.err); System.exit(1); } } }