"Error: Java_home not found in your environment.
Please set the java_home variable in your environment to match the location of your installation"
I try to create a small project in visual studio code so I installed Java extension pack, and it keeps displaying this error message, and I have tried to make some changes in my system environment but it still not working out, I use java-maven, maven-archetype-quickstart, version 1.4.
I expect it run smoothly.
3
Answers
I hope this helps you:
JAVA_HOME
variable usingecho
.How to do this for different operating systems can be seen here: Set JAVA_HOME Variable.
P.S. Of course you must have a JDK installed on your system.
Do basic settings.
Vscode Java Development Pack default depend on your system JDK, if you not install, try install it by following this toturial https://www3.ntu.edu.sg/home/ehchua/programming/howto/jdk_howto.html
If you installed, open the VS Code terminal and run
java --version
to check whetherJAVA_HOME
is added to your PATH. If everything is correct, it will print the Java version. If an error occurs, you should set the environment variable by following this link: https://confluence.atlassian.com/doc/setting-the-java_home-variable-in-windows-8895.html