How do I install JDK7 (Java 7) on Mac OS X 10.7.3? [closed]

こ雲淡風輕ζ 提交于 2019-12-31 10:40:33

问题


What is the link to install JDK7 (Java 7) on Mac OS X 10.7.3?

What version does it install?

Where does it install on my box?

How do I use it?


回答1:


Download Java SE 7u4 from Oracle. (This is 64-bit only)

This installs to /Library/Java/JavaVirtualMachines/1.7.0.jdk.

However, when you run java -version it will still output 1.6 or some other old version. Follow the readme directions below:

Open Java Preferences in /Applications/Utilities. Drag Java SE 7 to the top. It will now be your default JVM. Run java -version again, and you should see something like:

java version "1.7.0_04"
Java(TM) SE Runtime Environment (build 1.7.0_04-bxx)
Java HotSpot(TM) 64-Bit Server VM (build 23.0-b17, mixed mode)

Once this is complete, a new install of Eclipse should select JDK7 by default. Otherwise:

  1. go to Eclipse->Preferences...->Java->Installed JREs
  2. click Add...
  3. Select Standard VM
  4. paste /Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home into JRE home
  5. Change the JRE name to something useful like Java SE 7
  6. Click Finish
  7. Check the checkbox next to your newly created JRE.



回答2:


Make sure that you aren't setting JAVA_HOME in your .bash_profile, otherwise this may prevent java -version from returning the desired result.




回答3:


You just download it here, install it where you like, and include it in your path or select that JDK in your IDE



来源:https://stackoverflow.com/questions/10350867/how-do-i-install-jdk7-java-7-on-mac-os-x-10-7-3

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!