The situation with Mac is weirder. To really change the system-level Java, you would have to find the latest installer and install it last to take effect. If you care only about how java runs in your terminal, the following should work: