im learning java and have some issues with opening a file when i try to input it from the terminal. Currently my code looks a little like this but i have tried with scanner, file etc.
if(args.length < 1) {
System.out.println("No maze file inputed, exiting");
System.exit(1);
}
Reader reader = new FileReader(args[0]);
When i compile i use "javac main.java test.txt" and i get the error message "Class names, 'test.txt', are only accepted if annotation processing is explicitly requested" What am i doing wrong here? (I want it to be a reader so i can send it into a method that takes a reader)