bashrc: simplify Java version switch logic