You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And when triggering the gradle task by double clicking the task item in the gradle task tree view it runs through nicely.
But when I run the task using the vscode-gradle extension API's runTask() it fails.
When using runTask() the default Java-17 JDK shipped with redhat.java is used (the task I'm using reports System.getProperty("java.home") in its error message).
Unfortunately I cannot reproduce the bug without any other extensions as I need redhat.java and vscjava.vscode-java-debug for their task types and debug adapter implementations.
The text was updated successfully, but these errors were encountered:
Me again, very sorry to have bothered you, I found my mistake:
I was calling runTask() API with workspace-relative project path (instead of absolute path).
Using the absolute path fixed it for me.
Extension Name: vscode-gradle
Extension Version: v3.16.4 and v3.16.2024111106 (pre-release)
OS Version: Windows 11 (23H2)
VSCode version: 1.95.3 (user setup)
JAVA_HOME
environment variable set toD:/java/Amazon/21.0.4/win32/x86_64/jdk
.Settings like this:
I'm developing an extension that runs a gradle task which validates the version of the Java VM it runs in.
The gradle server seems to be started with correct JDK (according to the message in
Gradle for Java
output channel):And when triggering the gradle task by double clicking the task item in the gradle task tree view it runs through nicely.
But when I run the task using the
vscode-gradle
extension API'srunTask()
it fails.When using
runTask()
the default Java-17 JDK shipped withredhat.java
is used (the task I'm using reportsSystem.getProperty("java.home")
in its error message).Unfortunately I cannot reproduce the bug without any other extensions as I need
redhat.java
andvscjava.vscode-java-debug
for their task types and debug adapter implementations.The text was updated successfully, but these errors were encountered: