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
Asked
Active
Viewed 27 times
0
-
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 Answers
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