在Mac OS High Sierra上安装NetBeans 8.2/在Mac OS High Sierra上安装NetBeans 8.2 [英] Install netbeans 8.2 on Mac os high sierra / Installer netbeans 8.2 on mac os high sierra

查看:389
本文介绍了在Mac OS High Sierra上安装NetBeans 8.2/在Mac OS High Sierra上安装NetBeans 8.2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Mac OS High Sierra下尝试使用NetBeans 8.2时遇到问题.我正在尝试创建一个新项目,但没有任何反应.

I'm encountering a problem by trying to use NetBeans 8.2 under Mac Os High Sierra. I'm trying to create a new project but nothing happens.

因此,在Web上进行了几次搜索后,我似乎理解我的问题是Java JDK的实际版本为11.0.

So after few search over the web I seem to understand that my problem is my actual version of Java JDK which is 11.0.

不幸的是,我不知道如何将我的实际版本切换到较早的JDK 8.0,该版本似乎是用于netbean 8.2的版本! :/

Unfortunately I dont know how to switch my actual version to an earlier one JDK 8.0 which seems to be the one to use for netbean 8.2 ! :/

如果有人知道如何帮助我,我将非常感激! :P

If anyone knows how to help me I would be really greatful ! :P

Maxime Prieur

Maxime Prieur

推荐答案

使NetBeans 8.2正常工作涉及两个步骤:

There are two steps involved in getting NetBeans 8.2 to work:

  1. 如果您的计算机上尚未安装JDK 1.8,请下载并安装它:
  1. Download and install JDK 1.8 if it is not already on your machine:
    • This answer describes how to do that for openjdk 1.8 on High Sierra.
    • Alternatively, you can download Oracle JDK 1.8. The installation instructions are here.
  • 在NetBeans安装目录下的 etc 目录中找到文件 netbeans.conf .
  • 这是一个包含名称/值属性对的文本文件.在任何文本编辑器中将其打开.
  • 它可能指定的属性之一是通过属性 netbeans_jdkhome 使用的默认JDK的路径.因此,找到包含文本 netbeans_jdkhome 的行.
  • 如果以#字符开头的行被注释,则删除该字符.
  • 万一该属性根本不存在于文件中,只需将其插入文件末尾即可.
  • 该属性的值应该是JDK 1.8安装的路径.
  • 在我的NetBeans 8.2安装中,我的输入看起来像这样netbeans_jdkhome="C:\Java\jdk1.8.0_181",尽管显然您的路径会有所不同.
  • 将更改保存到 netbeans.conf 并重新启动Netbeans.您的问题应该得到解决.
  • Locate file netbeans.conf within the etc directory under the NetBeans installation directory.
  • It is a text file containing name/value property pairs. Open it in any text editor.
  • One of the properties it might specify is the path to the default JDK to be used via property netbeans_jdkhome. Therefore locate the line containing the text netbeans_jdkhome.
  • If line is commented by starting with the # character then delete that character.
  • In the unlikely event that the property does not exist in the file at all, just insert it at the end of the file.
  • The property's value should be the path to your JDK 1.8 installation.
  • In my NetBeans 8.2 installation my entry looks like this netbeans_jdkhome="C:\Java\jdk1.8.0_181", though obviously your path will be different.
  • Save your change to netbeans.conf and restart Netbeans. Your issue should be resolved.

或者,如果您希望使用JDK 11,则可以采用完全不同的方法:

Alternatively, if you would prefer to use JDK 11, you could take a completely different approach:

  • Download and install Apache NetBeans 10.0 which supports JDK 11.
  • Since you already have JDK 11 installed, NetBeans should work immediately.

注意:

  • 使用NetBeans 10.0,可以将各个项目配置为使用JDK 8、9、10或11,但前提是:
    • 相应的JDK已安装在您的计算机上.
    • 相应的JDK也作为 Java平台添加到NetBeans中(使用工具> Java平台>添加平台... ).
    • With NetBeans 10.0, individual projects can be configured to use JDK 8, 9, 10 or 11, provided that:
      • The corresponding JDK is installed on your machine.
      • The corresponding JDK is also added as a Java Platform within NetBeans (using Tools > Java Platforms > Add Platform...).

      这篇关于在Mac OS High Sierra上安装NetBeans 8.2/在Mac OS High Sierra上安装NetBeans 8.2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆