How can I change Mac OS's default Java VM returned from /usr/libexec/java_home

后端 未结 12 739
刺人心
刺人心 2020-12-04 04:42

(Wasn\'t sure if this should go on SU... migration is certainly an option, but more programmers read questions here, so here goes).

I am running Mac OS X 10.8.4, and

12条回答
  •  萌比男神i
    2020-12-04 05:38

    It's actually pretty easy. Let's say we have this in our JavaVirtualMachines folder:

    • jdk1.7.0_51.jdk
    • jdk1.8.0.jdk

    Imagine that 1.8 is our default, then we just add a new folder (for example 'old') and move the default jdk folder to that new folder. Do java -version again et voila, 1.7!

提交回复
热议问题