So when I compile, everything will compile just fine.
When I go to run the program, I get this error
Exception in thread \"main\" java.lang.ArrayI
You have not provided any command-line arguments to your application. Thus, args has no element 0.
args
Provide an argument (the path to the file of interest) when invoking your application:
java MyApp path/to/file
You need to specify a parameter when you run the application.