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 screen shot

How can I fix this?

Upvotes: 0

Views: 1297

Answers (1)

skomisa
skomisa

Reputation: 17373

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: Options window

  • 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: Installnbjavac

  • 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":

    Installed plugins

  • 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.

Upvotes: 3

Related Questions