more java example fixes