Reading a .text file using the Java Scanner class


I am working on a Java program that reads a text file line-by-line, each with a number, takes each number throws it into an array, then tries and use insertion sort to sort the array. I need help with getting the program to read the text file.

I am getting the following error messages: 10_Random (The system cannot find the file specified)
at Method)
at<init>(Unknown Source)
at java.util.Scanner.<init>(Unknown Source)
at insertionSort.main(

I have a copy of the .txt file in my "src" "bin" and main project folder but it still cannot find the file. I am using Eclipse by the way.

import java.util.Scanner;

public class insertionSort {

public static void main(String[] args) {

    File file = new File("10_Random");

    try {

        Scanner sc = new Scanner(file);

        while (sc.hasNextLine()) {
            int i = sc.nextInt();
    catch (FileNotFoundException e) {

You have to put file extension here

File file = new File("10_Random.txt");