[英]Apache NetBeans IDE 12.0 cannot create new java application
I installed Java NetBeans IDE 12.0 and JDk-16.我安装了 Java NetBeans IDE 12.0 和 JDK-16。 When I try to create a project using Java With Ant, it get stuck like in the screenshot.
当我尝试使用 Java 和 Ant 创建项目时,它会像屏幕截图一样卡住。 When I cancel it, it creates the file but no code in it ie, no main method is created.
当我取消它时,它会创建文件但其中没有代码,即没有创建 main 方法。 Just a blank file.
只是一个空白文件。
Does anyone know how to solve this?有谁知道如何解决这个问题?
From the NetBeans documentation for "Deployment Platforms" for NetBeans 12.0 :来自NetBeans 12.0 的“部署平台”的 NetBeans 文档:
Apache NetBeans 12.0 runs on the JDK LTS releases 8 and 11, as well as on JDK 14, ie, the current JDK release at the time of this NetBeans release.
Apache NetBeans 12.0 在 JDK LTS 版本 8 和 11 以及 JDK 14 上运行,即在此 Z69F0F6923BC1F8AAA26B96BC82 发布时的当前 JDK 版本。
NetBeans may work (or appear to work) with newer JDK releases that are not officially supported such as JDK 16, but you run the risk of hitting unexpected problems. NetBeans 可能适用(或似乎适用)不受官方支持的较新 JDK 版本,例如 JDK 16,但您可能会遇到意外问题。
So if you don't need any Java features released after JDK 14, download and install JDK 14 , and add it as a Java platform in NetBeans, using Tools > Java Platforms > Add Platform...
. So if you don't need any Java features released after JDK 14, download and install JDK 14 , and add it as a Java platform in NetBeans, using
Tools > Java Platforms > Add Platform...
. You don't need to uninstall JDK 16.您无需卸载 JDK 16。
However, if you really need JDK 16 features then use a different IDE.但是,如果您确实需要 JDK 16 功能,请使用不同的 IDE。 The latest release of Eclipse, 2021-03, explicitly supports JDK 16 .
最新版本 Eclipse,2021-03,明确支持 JDK 16 。
I had the same problem and was able to solve it in windows by following the steps below:我遇到了同样的问题,并且能够按照以下步骤在 windows 中解决它:
For me it helped using NetBeans version 12.5 and the JDK 14. After that everything was running smooth.对我来说,它有助于使用 NetBeans 版本 12.5 和 JDK 14。之后一切运行顺利。
I had the same problem and upgrading to version 12.5 worked for me.我遇到了同样的问题,升级到 12.5 版对我有用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.