'javac' is not recognized as an internal or external command, operable program or batch file. in VS Code, using Code Runner extension
Assume you are on the Windows System.
First, you might want to add your jdk path to window system environment.
Then, open your VS Code, and go to User Settings located under File -> Preferences -> User Settings.
Add jdk PATH in your VS Code as the following shows.
Important Step: after all above steps are done, you might want to restart the VS Code to let change go in effect.
To test if it works, open Integrated Terminal in VS Code under View (or type Ctrl + ` (this key is located next to number 1)
Once the terminal shows up and is initialized, type javac
to verify VS Code recognize the command.
![Mocoma](https://lh3.googleusercontent.com/-7RujzO9Ke5M/AAAAAAAAAAI/AAAAAAAAAIM/zglEeaMIXRQ/photo.jpg?sz=256)
Mocoma
Updated on June 23, 2022Comments
-
Mocoma about 2 years
I am trying to run some java code in VS Code with the Code Runner extension, but i keep getting this:
'javac' is not recognized as an internal or external command,
operable program or batch file.
I checked all the paths and updated the path in VS Code, but it did nothing.
-
Jörg over 6 yearsI have many different projects on my computer and each requires its own JDK version. I do not want to pollute my system path to get an IDE working. There has to be a property in settings.json to point to the JDK or even better one would expect that if java.home points to a valid JDK that VS Code can find javac on its own.
-
Aviroxi about 3 yearsi am not able to find the workspace settings in vscode
-
leoflower about 3 years@gurukiranx can you please try with this link User and Workspace Settings