I'm not familiar with the Scanner class as it is brand new to Java 5.0. However, I have a few questions and comments that may help you figure out the problem. First, do you know where it hangs? Does it hang up when you try to get the day, month, or year? If you aren't sure, perhaps you can add some System.out.println() calls between each call to kdb.next(). Perhaps printing out the value returned by next() will help see what is going on.
12 25 ... it hangs on the year. It think it has something to do with the delimiter (/). It doesn't have one at the end of the year so it just hangs. I don't know how you get around the problem. Any ideas?
It's waiting for you to enter the next delimeter or for the stream to end. You're better off using a Reader wrapped around System.in and Reader.readLine() to read the input. Then use the Scanner on the line you read in. Since the String will have an end, the scanner should break it apart correctly.
Otherwise, if you're using a version of Unix/Linux, I believe you can tell it the stream has ended using control-D. I have no idea how to do that on Windows . . . perhaps control-alt-delete. (No, don't do that)
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com