0

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

underscore_d
  • 6,309
  • 3
  • 38
  • 64
  • Does this answer your question? [ERROR: JAVA\_HOME is not set and no 'java' command could be found in your flutter PATH. in flutter](https://stackoverflow.com/questions/64359564/error-java-home-is-not-set-and-no-java-command-could-be-found-in-your-flutter) – Kevin Jan 27 '22 at 12:46

1 Answers1

0

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",
     ...

}
Arthi Siva
  • 26
  • 4