I just downloaded vscode and I'm new to coding. I installed the extensions for java online before downloading vscode itself. I made a project and created a file inside. Visual studio code won't let me run or debug. It just keeps giving me the same exact error every single time. I already have a JDK downloaded, but it keeps giving me the error. I don't really understand what is wrong. Could someone please help me? Here are the images of the 2 errors I get: (https://i.stack.imgur.com/YPJVQ.png) (https://i.stack.imgur.com/wgo5q.png)
I deleted and reinstalled the red hat JDK many times, but it won't work. I'm not sure if there is a step I'm missing out or something. I also deleted and reinstalled vscode to try to get it to work, but no luck. I looked at other forums, but I don't understand what they are saying.
Have you set the jdk path in environment variables? If not then follow the steps below:
Now you can retry running your program and maybe restart vscode and try again if it doesn't work.
Hope it helps, Happy coding :)