简体   繁体   English

如何使用JDK 10在Windows 7 64位上设置NetBeans IDE 8.2

[英]How to set NetBeans IDE 8.2 on Windows 7 64-bit with JDK 10

I installed 64 bit version of C/C++ version of netbeans from here https://netbeans.org/downloads/ I am using Cygwin to work with netbeans 8.2 things upto here are fine , I needed java for one of my projects so I downloaded jdk-10.0.2_windows-x64_bin and installed it in E:\\installation2\\java 我从此处安装了netbeans的C / C ++版本的64位版本https://netbeans.org/downloads/我正在使用Cygwin来与netbeans 8.2一起使用到目前为止,一切都还不错,我需要为其中一个项目安装Java,所以我下载了jdk-10.0.2_windows-x64_bin并将其安装在E:\\installation2\\java

The path variable and other settings are 路径变量和其他设置是

PATH=C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (
x86)\PC Connectivity Solution\;C:\Windows\system32;C:\Windows;C:\Windows\System3
2\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\WIDCOMM\Blue
tooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\cygwin64
\bin;E:\installation2\putty\;C:\Program Files\Java\jdk-10.0.2\bin;E:\installatio
n2\python3\Scripts\;E:\installation2\python3\;

C:\Users\>java --version
java 10.0.2 2018-07-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.2+13)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.2+13, mixed mode)

However when I try to create a new project in netbeans8.2 for Java I don't get that options.Here is a screenshot of Java Platform manager on Netbeans Tools--->Java Platfoms window 但是,当我尝试在netbeans8.2中为Java创建一个新项目时,却没有该选项。这是Netbeans Tools ---> Java Platfoms窗口上Java Platform Manager的屏幕截图 在此处输入图片说明

In a notepad I am able to write Java programs and compile them and execute them but not in netbeans 8.2 I am not able to understand why Netbeans8.2 is not able to create Java project. 在记事本中,我能够编写Java程序并对其进行编译并执行,但在netbeans 8.2中则无法,但我无法理解为什么Netbeans8.2无法创建Java项目。 What can I do to fix this?What is the mistake in above configuration? 我该怎么做才能解决此问题?上述配置有什么错误?

You need to have the Java SDK (JDK) installed, instead of the JRE. 您需要安装Java SDK (JDK),而不是JRE。 Simply download JDK 8 from Oracle ( not 9 or 10+ because these are not supported by NB 8.2) and install it. 只需从Oracle下载JDK 8( 而不是 9或10+,因为NB 8.2不支持这些)并安装它。 Then you can edit the Netbeans config file to point to the JDK: 然后,您可以编辑Netbeans配置文件以指向JDK:

Edit netbeans.conf file in C:\\Program Files\\NetBeans 8.2\\etc\\ : 编辑C:\\Program Files\\NetBeans 8.2\\etc\\ netbeans.conf文件:

netbeans_jdkhome="C:\Program Files\Java\jdk1.8.0_xyz" 

Alternatively, you can delete the existing platform and create a new Java platform in the Netbeans Platform Manager, pointing to the JDK path. 或者,您可以删除现有平台并在Netbeans Platform Manager中指向JDK路径创建一个新的Java平台。

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

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