Closed paratechnical closed 2 years ago
Possibly try unticking the option to prefer the Gradle wrapper that comes with the project. You can update the wrapper in that project later if you want to reenable that option.
cc/ @lkishalmi is there an easier way to handle this? Maybe need a wrapper update UI? Or am I missing there is one somewhere?
Well, there is no real workaround can be don on NetBeans side. NetBeans 12.5 does not really support running on JDK 17. We have NetBeans 12.6 for that. Also NetBeans 13 will report such issues more detailed to users.
Just briefly: Due to limitations in Gradle, it's no matter what version you set for Gradle, or JDK, the project introspection will happen with the JDK the IDE is running on, starting with the Gradle Tooling API the IDE is provided with. If the Tooling API does not support the JDK the IDE is running on, then this is what happens. Gradle 7.3 is the first one which supports JDK 17 as runtime. We were lucky with 12.6 that Gradle released that just a few days before our last release candidate.
Sorry, @lkishalmi missed the 12.5 in there. So, yes, @paratechnical please upgrade to 12.6, or try out a 13 rc.
However, I have noticed a similar issue on 12.6 with projects with an older wrapper and JDK 17.
Apache NetBeans version
Latest release
What happened
Netbeans 12.5 - It worked in Netbeans 11 When I open the project I get this error
When I tell Netbeans that I want to resolve it it doesn't work and I get this warning.
I tried changing the gradle version in Tools->Options->Java->Gradle to 6 doesn't seem to change anything because the warning still mentions gradle 7. I tried changing the java version but that doesn't seem to work either.
I tried deleting the cache both in the project and in the gradle folder C:\Users\.gradle
How to reproduce
create a gradle project in netbeans 11 open in netbeans 12
Did this work correctly in an earlier version?
Operating System
Windows 10 Pro
JDK
17.0.1
Apache NetBeans packaging
Apache NetBeans provided installer
Anything else
No response
Are you willing to submit a pull request?
Code of Conduct