Java NetBeans 8.1 激活失败

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/33868896/
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-08-11 15:06:20  来源:igfitidea点击:

NetBeans 8.1 Activation Failure

javanetbeansubuntu-14.04netbeans-8.1

提问by kylas

I am trying to install NetBeans 8.1 on my Ubuntu 14.04.3 LTS. When I try to create a new project, it shows an error, saying that "not all requested modules can be enabled". I tried activating it from the plugins, but to no avail.

我正在尝试在我的 Ubuntu 14.04.3 LTS 上安装 NetBeans 8.1。当我尝试创建一个新项目时,它显示一个错误,说“并非所有请求的模块都可以启用”。我尝试从插件激活它,但无济于事。

Why is this happening, and what can I do to resolve it?

为什么会发生这种情况,我可以做些什么来解决它?

Check the screenshot here

检查这里的屏幕截图

回答by Sergey Dreger

I had the same problem with NetBeans 8.1 on Linux Mint 17.2 and I found the solution (during install a have chosen wrong JDK directory).

我在 Linux Mint 17.2 上的 NetBeans 8.1 遇到了同样的问题,我找到了解决方案(在安装过程中选择了错误的 JDK 目录)。

If a compatible JDK installation cannot be found, you might need to manually add a path to the JDK installation directory by doing the following:

如果找不到兼容的 JDK 安装,您可能需要通过执行以下操作手动添加到 JDK 安装目录的路径:

  1. Open the netbeans.conffile located in the netbeans/etcdirectory in a text editor.
  2. Enter the location of a compatible JDK installation for the netbeans_jdkhome option. The default location in Windows is C:\Program Files\Java\jdk1.7.0_67 or similar.
    In my case: /usr/lib/jvm/java-8-oracle/
  3. Save the netbeans.conf file and run the executable file in the netbeans/bin directory.
  1. 在文本编辑器中打开位于netbeans/etc目录中的netbeans.conf文件。
  2. 为 netbeans_jdkhome 选项输入兼容的 JDK 安装位置。Windows 中的默认位置是 C:\Program Files\Java\jdk1.7.0_67 或类似位置。
    就我而言:/usr/lib/jvm/java-8-oracle/
  3. 保存 netbeans.conf 文件并运行 netbeans/bin 目录中的可执行文件。

https://netbeans.org/community/releases/81/install.html#install_zip

https://netbeans.org/community/releases/81/install.html#install_zip

回答by Chan Teck Wei

Just in case, I solved this just by commenting out the following line;

以防万一,我只是通过注释掉以下行来解决这个问题;

netbeans_jdkhome="/usr"

To

#netbeans_jdkhome="/usr"

Edit:

编辑:

The directory of the above code is inside the file ~/netbeans-8.1/etc/netbeans

上面代码的目录在文件~/netbeans-8.1/etc/netbeans里面

回答by pavan kvch

1) uninstall Netbeans & download JDK 8 http://www.oracle.com/technetwork/java/javase/downloads/index.htmlfrom Here

1) 卸载 Netbeans 并从这里下载 JDK 8 http://www.oracle.com/technetwork/java/javase/downloads/index.html

2) Extract JDK to /home/username/

2) 将 JDK 解压到 /home/username/

3) Download Netbeans https://netbeans.org/downloads/

3) 下载 Netbeans https://netbeans.org/downloads/

4) Install Netbeans from terminal follow thistutorial

4) 按照教程从终端安装 Netbeans

5) Installation asks jdk location then browse to /home/username/jdk1.8.0_91

5)安装询问jdk位置然后浏览到/home/username/jdk1.8.0_91

problem solved.....

问题解决了.....

回答by Osama Al-Banna

I had the same exact issues,what I have done is :-1

我有同样的问题,我所做的是:-1

  1. uninstall net-beans, 2.I already have Oracle Java 8 installed. 3.install net-beans back and make sure to select Oracle Java 8 jdk during the installation .
  1. 卸载 net-beans,2.我已经安装了 Oracle Java 8。3.重新安装net-beans并确保在安装过程中选择Oracle Java 8 jdk。

回答by Mohammed

Make sure that right JDK directory chosen in the installation wizard if you not sure you can change it from C:\Program Files\NetBeans {netbeans version}\etcyou will see a file which is netbeans.confedit it(I am using Notepad++ for that) At the bottom of the file, you will see a line netbeans_jdkhome="C:\Program Files\Java\{jdk directory you want}"make sure it is valid JDK and it is JDK, not JRE

确保在安装向导中选择了正确的 JDK 目录,如果您不确定可以更改它,C:\Program Files\NetBeans {netbeans version}\etc您将看到一个正在netbeans.conf编辑它的文件(我正在使用 Notepad++)在文件的底部,您将看到一行netbeans_jdkhome="C:\Program Files\Java\{jdk directory you want}"make确定它是有效的 JDK 并且它是 JDK,而不是 JRE