Closed fwhdzh closed 8 months ago
This error comes from RedHat Java language support extension. It duplicates with https://github.com/redhat-developer/vscode-java/issues/1551
I find a wired situation, when using {env.JAVA_HOME} in systemPath, now there is no error wave line, but when using {java.home} it still exists. I find it in Linux with OpenJDK 8.
Describe the bug In my pom.xml, I add a dependcy of the tools.jar in jdk
A wave line appears under this dependency. When we move our mouse on it, it will show "Project build error: 'dependencies.dependency.systemPath' for jdk.tools:jdk.tools:jar must specify an absolute path but is ${env.JAVA_HOME}/lib/tools.jar".
However, this dependency is correct. If I use
mvn install
directly in bash terminal, maven will successfully complier the project and install it to local repository. If I setmaven.executable.path
, themvn install
can also work in the terminal in VScode. In another word, I think it is just a misinformation in the panel.To Reproduce Steps to reproduce the behavior:
JAVA_HOME
environment variable as the directory of jdk installation. Ensure$JAVA_HOME/lib/tools.jar
exists.Expected behavior There should be no error shown in VSCode Panel.
Environments (please complete the following information as much as possible):
Screenshots
The wave line shows there is an error.
The detailed error information.
If we run
mvn install
command in bash terminal, everything is ok.Terminal built-in VSCode also works well to handle this dependency.