Java utils.