Added an "at least it works" Java version!

This is still very much a work in progress, but it seems to work fine. Expect lots of cleanups later.