What is that blazing inferno that I see?
It turns out that I hadn't quite finished the Java code when I embarked upon fixing the C++ code. The Java code is now finished up (I think) and is starting to behave itself. The good news is that fixing the Java code is much faster than fixing the C++ code for some language-related reasons, so it only took a couple of hours to patch in the changes.
I have one last change that I have to test tomorrow, because it got to the point tonight when it was time to stop messing with things due to being a bit too tired. :)
We'll see how it goes.