If you're going to go through THIS MUCH WORK, could you atleast document it a little such as including or mentioning which/what Java version and/or JDK version you used and/or what version and/or versions it should work for?
It's very frustrating dealing with a huge complex single block of code that doesn't work, only to find that it actually does, after sitting there for hours trying to think of every possible syntax error in the book, feeling like a complete fucking idiot, only to find out the reason why it doesn't work, is because of the version of Java you're using.