Using Commandline Arguments in Netbeans IDE 8.1
<p>I am trying to get my Java program to work but it gives me this error:</p>

<pre><code>run:
Can't find file scores.txt
java.io.FileNotFoundException: scores.txt (The system cannot find the file specified)
at java.io.FileInputStream.open0(Native Method)
usage: java ScoresReader sourceFile destFile
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.&lt;init&gt;(FileInputStream.java:138)
at java.util.Scanner.&lt;init&gt;(Scanner.java:611)
at Scores.project.ScoresReader.readData(ScoresReader.java:65)
at Scores.scoresreader.ScoresReader.main(ScoresReader.java:260)
java.lang.RuntimeException: Uncompilable source code - Erroneous tree type:
    cern.list.IntArrayList
at Scores.scoreseader.ScoresReader.main(ScoresReader.java:262)
BUILD SUCCESSFUL (total time: 2 seconds)
</code></pre>

<p>So from the 2nd line it says it can't find the file scores.txt even though I placed that file in the same directory as the class file (ScoresReader.java).</p>

<p>I also set the file scores.txt and dest.txt in the Netbeans 8.1 IDE configuration box according to the instructions given by the following:</p>

<pre><code>1. Right click the project name and choose Set Configuration | Customize ...
2. In the configuration dialog, I typed the two files: scores.txt dest.txt
in the arguments box. And the two files showed up in the IDE o.k. Nothing
seem to be wrong there.
</code></pre>

<p>When I ran the project or file it gave me the above error. Here is an abbreviated code snippet:</p>

<pre><code>public class ScoresReader implements Serializable
   {
    private static final long serialVersionUID = 7526472295622776147L;
    public OpenIntIntHashMap Scores;

    /**
    * Default constructor. Initializes hashtables. 
    */
    public ScoresReader()
       {
        Scores = new OpenIntIntHashMap();
        ..
        ..
       }
    /**
    * Reads a text file
    */
    public void readData(String fileName)
       {
        //Reads from an input text file in the form of:
        //score_id, user_id, score
        //and stores this data in the hashtables. 
       }

    /**
    * Serializes a ScoresReader object so that it can be read back later. 
    */
    public static void serialize(String fileName, ScoresReader obj)
       {
        //serialize the score objects
        ..
       }

    public static void main(String args[])
       {
        ScoresReader reader = new ScoresReader();
        String sourceFile = null;
        String destFile = null;
        try
           {
            sourceFile = args[0];
            destFile = args[1];
            reader.readData(sourceFile);
            reader.sortScores();
            serialize(destFile, reader);
             ..
             ..
           }
       catch(Exception e)
           {
            System.out.println("usage: java ScoresReader sourceFile destFile");
            e.printStackTrace();
           }
       }//end main
    }//end class ScoresReader
</code></pre>

<p>Can anyone please tell me why it can't find the file?</p>

<p>Thanks in advance!</p>