title: Java issue: Handling an argument as a file and reading it
body: <p>So I'm trying to figure this one out. I have a file, let's say it's text.txt. I want to open this using "Open with.." in Windows. From what I've figured out, this Windows function is just passing the file path as an argument to the program. In Java, I have this at the moment:</p>
  
  <pre><code>import java.io.*;
  public class program {
  
  
  public static void main(String[] args) throws IOException {
         File inFile = new File(args[0]);
  
      InputStreamReader fileIO = new InputStreamReader(inFile);
      fileIO.toString();
      System.out.println(fileIO);
      fileIO.close();
  }
  
  }
  </code></pre>
  
  <p>When I run it, I get this.</p>
  
  <pre><code>Exception in thread "main" java.lang.Error: Unresolved compilation problem: 
      The constructor InputStreamReader(File) is undefined
      at program.main(program.java:8)
  </code></pre>
  
  <p>I have put the file path in the run configuration and not even my Google Fu is working on this one. I'm quite tired tho, so I'll just leave this here for now.</p>
  
  <p>EDIT: Apparently the superclass is java.lang.*, but whatever, that shouldn't matter(?)</p>