When I run this command java --version still working in cmd terminal but they show me add your path java_home . I'm not sure why give me this error. I'm using vs code

When I run this command java --version still working in cmd terminal but they show me add your path java_home . I'm not sure why give me this error. I'm using vs code
This happens because of the configuration settings setup. Inside settings.json try adding the path of the jdk and try again
Open the command palette (either with F1 or Ctrl+Shift+P) Type "open settings" You are presented with two options, choose "Open Settings (JSON)" Then add the below command
{
...
"java.home": "/usr/share/java/jdk-11.0.4",
...
}