Started Java port. Not finished yet though.