简体   繁体   中英

Why can't my project in Apache Netbeans 12.5 be run using JDK 17?

I am using Apache NetBeans 12.5 with JDK 17.0.1.

When I run my project it can't be run, as you can see from this screen shot:

NetBeans 屏幕截图

How can I fix this?

One of the notifications in your screen shot ( "Install nb-javac Library" ) indicates the probable cause of your problems. To fix that you need to install the nb-javac library:

  • Select Tools > Options > Java > GUI Builder

  • Your Options window will look similar to this if the nb-javac plugin is not installed: 选项窗口

  • You don't need to do anything beyond opening that tab to provoke the NetBeans Installer to invite you to install the nb-javac plugin: 安装nbjavac

  • click Next > and complete the wizard to install the nb-javac plugin.

  • No restart of NetBeans is required to ensure that the plugin has been installed successfully. Just navigate to Tools > Plugins > Installed and check for the presence of an entry labeled " The nb-javac Java editing support library ":

    已安装的插件

  • Finally, verify that you can now run your project.

If you still have problems after installing nb-javac then click the " Unexpected Exception " entry in the Notifications window (as shown in your screen shot), and update your question with the extra details NetBeans provides.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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