Well, I think you've encountered a limitation in Gradle. The priming
build is always use the same JDK as the NetBeans IDE. Unfortunately
there is no workaround that.
It needs to be investigated why the project requires Java 15 to load.
Sometimes people just check the java version in the script and throw an
exception if that does not match their criteria. In that case the Java
version check shall be added into a task, so the project can be
evaluated with other Java versions as well.
Also at the moment NetBeans comes with Gradle 6.6 tooling wich might not
work well with Java 15. Gradle 6.7 will support Java 15, however they
just released th 5th RC of Gradle 6.7. I hope the final 6.7 can make it
into NetBeans 12.2.
On 10/14/20 1:06 PM, Scott Palmer wrote:
I'm having an issue with how NetBeans runs Gradle when it loads a project.
The first time I tried to load the project it failed. That is because
NetBeans is running with Java 8 and the project requires Java 15. So I
change the project properties Build/Compile JDK to Java 15 and try to
reload, but it appears that the script evaluation is still being done with
Java 8 and so the project script throws an exception and fails to load
completely load the project.
I can run a build, even from within NetBeans, and it works, but the project
won't load properly because it seems that JAVA_HOME is not set based on the
NB project properties when initially loading the project script. I can
live with the fact that the first load fails and I have to tell NB which
JDK to use, but that workaround isn't working either.
Scott
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org
For additional commands, e-mail: dev-h...@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists