How do I run a Java program on Visual Studio Code?

0

After trying for an hour I need help.

I first got the installer Java for Visual Studio Code from the microsoft website. Then I went to my system's environment variables clicked path, added

"C:\Program Files\Java\jre1.8.0_221\bin"

I gave it its own environment variables called java as well under the same path

I got the visual studio java extensions such as the debugger, the extension pack, the language support by RedHat. I got the visual studio to make projects but clicking the run just says "javac' is not recognized as an internal or external command,"

I looked at the other answers which just say to set my path, which I already did, I checked by typing "javac -version" in cmd, it pops up. Visual Studio Code just can't see it for some reason.

Aron Mlodkowski

Posted 2019-09-30T19:21:11.600

Reputation: 1

You configured Visual Studio to be aware of this new system variable you added? – Ramhound – 2019-09-30T22:03:50.647

I dont know what that even means – Aron Mlodkowski – 2019-09-30T22:30:04.777

Visual Studio Code must be configured to look at non-default system variables, otherwise, it's only going to look at PATH. Java Programming with Microsoft Visual Studio Code

– Ramhound – 2019-09-30T22:48:01.697

No answers