Initial Java prototype.