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
OS Version: Fedora 28
-Extensions: Java Extension Pack, WPILib Extension
Steps to Reproduce:
Build Robot Project-- project compiles properly on same machine in Eclipse
When you attempt to build in VS Code you get the below error
Task :compileJava FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':compileJava'.
Could not find tools.jar. Please check that /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.181-7.b13.fc28.x86_64/jre contains a valid JDK installation.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
This is not an issue in VS Code. However, as the developer of the WPILib extension, your issue is that you might be setting your java.home variable in VS Code, however that variable does not affect the build. You actually need to have your JAVA_HOME in the environment set to a JDK. It looks like yours is set to a JRE.
If switching your JAVA_HOME environment variable doesn't fix it, please create an issue in the GradleRIO issue over in WPILib. https://github.com/wpilibsuite/GradleRIO
Thank you. A few hours after posting I was able to set the JAVA_HOME path and then point VScode in settings to the same. This appears to have corrected the problem. I am still not certain why VScode was looking in the wrong location. (Eclipse had no issues locating the JDK when it was installed.
This issue can be closed. Thank you for your assistance.
-Extensions: Java Extension Pack, WPILib Extension
Steps to Reproduce:
When you attempt to build in VS Code you get the below error
Task :compileJava FAILED
FAILURE: Build failed with an exception.
Execution failed for task ':compileJava'.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 10s
1 actionable task: 1 executed
The terminal process terminated with exit code: 1
java.home has been set to the correct path, and we know JDK works because Eclipse builds with no issues on that path.
The text was updated successfully, but these errors were encountered: