title: Passing a file as a command line argument and reading its lines
body: <p>this is the code that i have found in the internet for reading the lines of a file and also I use eclipse and I passed the name of files as SanShin.txt in its argument field. but it will print :</p>
  
  <pre><code>Error: textfile.txt (The system cannot find the file specified)
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>public class Zip {
      public static void main(String[] args){
          try{
              // Open the file that is the first 
              // command line parameter
              FileInputStream fstream = new FileInputStream("textfile.txt");
              BufferedReader br = new BufferedReader(new InputStreamReader(fstream));
              String strLine;
              //Read File Line By Line
              while ((strLine = br.readLine()) != null)   {
                // Print the content on the console
                System.out.println (strLine);
              }
              //Close the input stream
              in.close();
              }catch (Exception e){//Catch exception if any
                System.err.println("Error: " + e.getMessage());
              }
  
  
      }
  }
  </code></pre>
  
  <p>please help me why it prints this error.
  thanks</p>