Optionally update alternatives for Java