eclipse 如何在eclipse中安装jdk 7

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/12043045/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 21:17:20  来源:igfitidea点击:

how to install jdk 7 in eclipse

eclipsemacosjava-7

提问by William Gu

I downloaded and installed jdk7 on my mac and wanted to find out the actual content of it so that I can install it in eclipse. There is no jdk 7 related content in /System/Library/Java.

我在我的mac上下载并安装了jdk7,想找出它的实际内容,以便我可以在eclipse中安装它。/System/Library/Java中没有jdk 7相关内容。

回答by aleroot

You need to let know eclipse where the JRE 7 is, and you can do in this way :

你需要让 eclipse 知道 JRE 7 在哪里,你可以这样做:

  1. Go to Preferences pane of eclipse
  2. Open Java on the left pane
  3. Click on Installed JREs
  4. Add Button ---> Standard JVM and Next
  5. Insert : /Library/Java/JavaVirtualMachines/jdk1.7.0_06.jdk/Contents/Homein the JRE Home TextBox
  6. Next and Save the configuration
  1. 转到 eclipse 的首选项窗格
  2. 在左侧窗格中打开 Java
  3. 单击已安装的 JRE
  4. 添加按钮 ---> 标准 JVM 和下一步
  5. 插入:/Library/Java/JavaVirtualMachines/jdk1.7.0_06.jdk/Contents/Home在 JRE 主页文本框中
  6. 下一步并保存配置

Example Configuration

示例配置

回答by Vikdor

You need to add JDK 7 to the list of installed JREs in Windows-> preferences -> java -> installed JREs.

您需要将 JDK 7 添加到 Windows-> 首选项 -> java -> 已安装 JRE 中的已安装 JRE 列表中。

回答by Roger Lindsj?

It is located in /Library/Java/JavaVirtualMachines/... So in /Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home you can find the bin folder, lib folder etc.

它位于 /Library/Java/JavaVirtualMachines/... 所以在 /Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home 你可以找到 bin 文件夹、lib 文件夹等。