Updated Java target

Added some fixes to get the Java target working, but some things don't
work yet. I marked those using a "//FIXME:".