Hi all,

when I run my Spring Boot Gradle 7.2 project from Netbeans 12.6, I am getting output like this:

JAVA_HOME="/etc/alternatives/java_sdk_11"
cd /myworkpath/mygradleproject/mysubproject; ../gradlew -x check -x test bootRun

The application then runs under JDK 11. This is even though I have in my gradle.properties:
org.gradle.java.home=/etc/alternatives/java_sdk_17

And in my build.gradle.kts:
java {
    toolchain {
        languageVersion.set(JavaLanguageVersion.of(17))
    }
}

The /etc/alternatives/java_sdk_11 is the JDK I have set in netbeans.conf for Netbeans to run the IDE under.

When I run ../gradlew -x check -x test bootRun from the command line, the application starts with Java 17 as defined in gradle.properties.

It appears that Netbeans sets its own JDK definition as JAVA_HOME for every build. Does anyone know how to prevent this override?

Kind regards,

Ulrich


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to