Programmer Paul

Greenhorn
+ Follow
since Aug 02, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Programmer Paul

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?
18 years ago