java: add error modes, version() & support diet engine