简体   繁体   English

C++ 不会安装在 Netbeans 11.0 中

[英]C++ Won't Install in Netbeans 11.0

I'm a beginner at programming and would like to know more about C++.我是编程初学者,想了解更多关于 C++ 的信息。 I installed Netbeans since it says it supports Java (which I am currently studying the basics at school) and C++ (which I want to study for personal interest).我安装了 Netbeans,因为它说它支持 Java(我目前正在学校学习基础知识)和 C++(我想学习个人兴趣)。 But when I tried to create a new project, I can't find C++.但是当我尝试创建一个新项目时,我找不到C++。 So I followed tutorials and ended up trying to install the plugin.所以我按照教程并最终尝试安装插件。 The thing is, it is not successful for me.问题是,这对我来说并不成功。 A message says:一条消息说:

"The Plugin Installer found problem timeout of loading C/C++ Remote Development API[org.netbeans.modules.cnd.api.remote/1.29.5.1] while install the following plugins: C/C++" “插件安装程序在安装以下插件时发现加载 C/C++ 远程开发 API[org.netbeans.modules.cnd.api.remote/1.29.5.1] 的问题超时:C/C++”

JDK version: java version "14.0.2" Java(TM) SE Runtime Environment (build 14.0.2+12-46) Java HotSpot(TM) 64-Bit Server VM (build 14.0.2+12-46, mixed mode, sharing) JDK 版本:java 版本“14.0.2”Java(TM) SE 运行时环境(build 14.0.2+12-46) Java HotSpot(TM) 64-Bit Server VM (build 14.0.2+1mixed mode)分享)

NetBeans version: Apache NetBeans IDE 11.0 (Build incubator-netbeans-release-404-on-20190319) NetBeans version: Apache NetBeans IDE 11.0 (Build incubator-netbeans-release-404-on-20190319)

Windows 10 Windows 10

Any recommendation/solution for me to both run Java and C++ on Netbeans?我有什么建议/解决方案在 Netbeans 上运行 Java 和 C++? Thank you!谢谢!

It did work for me downgrading the default Java from version 14 to version 11.将默认的 Java 从版本 14 降级到版本 11 确实对我有用。

After having commented somewhere above my unsuccessful experience like yours.在评论了我像你这样的不成功经历之后。 I decided to try it again but now focusing on Java version.我决定再试一次,但现在专注于 Java 版本。 I realized that Java version was the common point between your and mine environment.我意识到 Java 版本是您和我的环境之间的共同点。 You tried Netbeans 11 but I the recent version 12, and I had successful experiences in the past using C/C++ plugin with versions 11.1, 11.2 and 11.3 of Netbeans.您尝试了 Netbeans 11,但我是最近的版本 12,并且我过去使用 C/C++ 插件和 Netbeans 的 11.1、11.2 和 11.3 版本有过成功的经验。

I didn't go deeper to answer why it worked with Java 11 and not with 14. However, I can't believe it is the JVM version purely.我没有 go 更深入地回答为什么它与 Java 11 而不是 14 一起工作。但是,我不敢相信它纯粹是 Z18B5A217C4DAD25662D3A05EDB0E39D7 版本。

Later, after the installation I changed it again to Java 14, and it's still working.后来安装完我又改成了Java 14,还是可以的。 Below is the output terminal:下面是output端子:

$ sudo update-alternatives --config java
There are 3 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                         Priority   Status
------------------------------------------------------------
  0            /usr/lib/jvm/java-11-openjdk-amd64/bin/java   1111      auto mode
  1            /usr/lib/jvm/java-11-openjdk-amd64/bin/java   1111      manual mode
  2            /usr/lib/jvm/java-13-oracle/bin/java          1091      manual mode
* 3            /usr/lib/jvm/java-14-oracle/bin/java          1091      manual mode

Press <enter> to keep the current choice[*], or type selection number: 1
update-alternatives: using /usr/lib/jvm/java-11-openjdk-amd64/bin/java to provide /usr/bin/java (java) in manual mode

$ java --version
openjdk 11.0.8 2020-07-14
OpenJDK Runtime Environment (build 11.0.8+10-post-Ubuntu-0ubuntu120.04)
OpenJDK 64-Bit Server VM (build 11.0.8+10-post-Ubuntu-0ubuntu120.04, mixed mode, sharing)

$ /media/sf_downloads/Apache-NetBeans-12.0-bin-linux-x64.sh
Configuring the installer...
Searching for JVM on the system...
Extracting installation data...
Running the installer wizard...

$ sudo update-alternatives --config java   
There are 3 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                         Priority   Status
------------------------------------------------------------
  0            /usr/lib/jvm/java-11-openjdk-amd64/bin/java   1111      auto mode
* 1            /usr/lib/jvm/java-11-openjdk-amd64/bin/java   1111      manual mode
  2            /usr/lib/jvm/java-13-oracle/bin/java          1091      manual mode
  3            /usr/lib/jvm/java-14-oracle/bin/java          1091      manual mode

Press <enter> to keep the current choice[*], or type selection number: 3
update-alternatives: using /usr/lib/jvm/java-14-oracle/bin/java to provide /usr/bin/java (java) in manual mode

$ java --version
java 14.0.2 2020-07-14
Java(TM) SE Runtime Environment (build 14.0.2+12-46)
Java HotSpot(TM) 64-Bit Server VM (build 14.0.2+12-46, mixed mode, sharing)

My Linux version:我的 Linux 版本:

$ uname -a
Linux devmint 5.4.0-42-generic #46-Ubuntu SMP Fri Jul 10 00:24:02 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

The plugin appears as: "User Installed Plugin"该插件显示为:“用户安装的插件” 在此处输入图像描述

Experienced this problem with Netbeans 12. As experiment installed 11 but in the install dialog for the location and Java selection I didn't allow the JDK 15. I selected the current default Java 11. The C++ install worked. Experienced this problem with Netbeans 12. As experiment installed 11 but in the install dialog for the location and Java selection I didn't allow the JDK 15. I selected the current default Java 11. The C++ install worked.

Uninstalled 12 and reinstalled with changing to default Java.卸载 12 并重新安装,更改为默认 Java。 It installed C++ fine and works okay.它安装了 C++ 并且工作正常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM