I think the code is OK.
.
Here's what I would do to test it: (In fact, here's what I did on my Centos 6.3 Linux system.)

Forget about Eclipse for now. Here's the drill:


Create a...