I'm trying to use vs code for java. but get this error while running the code I tried to find the solution but I couldn't find, If any solution available please refer:
CodePudding user response:
Add the jdk path to your windows system environment.
Then in your VS code workspace settings add the path too.
CodePudding user response:
In a nutshell, you have not installed Java correctly. Finalizing the installation of Java on Windows requires some manual steps. You must always perform these steps after installing Java, including after upgrading the JDK.
- Find the Java path; it looks like this: C:\Program Files\Java\jdkxxxx\bin\
- Start-menu search for "environment variable" to open the options dialog.
- Examine PATH. Remove old Java paths.
- Add the new Java path to PATH.
- Edit JAVA_HOME.
- Close and re-open console/IDE.