Hi all, I am experencing some strange problems with the new Scanner class. I am running Java 1.5, update 4 on Windows XP. I have the code below, done using JCreator Pro:
The program works fine, but if I attempt to redirect input from a file, such as:
java test < commands.txt
it will crash with a NoSuchElementException.
Any idea what I am doing wrong?