I found the answer myself:
To set a custom JDK path for the command, you can use a environment variable named JavaSdkDirectory
that contains the JDK directory path.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello,
We build our .NET MAUI app for android using the dotnet publish command on the command line. During the build, the wrong version of the JDK (Java Development Kit) gets picked.
How can we specify the path to the JDK that should be used for the build?
We already tried setting the JAVA_HOME environment variable but without success. We are running the build on macOS.
Thank you for your help.
I found the answer myself:
To set a custom JDK path for the command, you can use a environment variable named JavaSdkDirectory
that contains the JDK directory path.