Home > database >  Couldn't compile java in vs code
Couldn't compile java in vs code

Time:12-01

I am not able to run java in vs code [my code]

public class hello {

    public static void main(String args[]) {
        System.out.print("Hello World")
    }
}

. I don't even have an option of run code in terminal in my settings..It is not showing any error or anything too![erased the semi-colon; but not showing any error].JDK-19 is installed and working.

I watched vids on youtube for a solution everyone is saying check "run code in terminal" option. I also downloaded an extention named code runner by which finally "run code in terminal" option was there I checked it and it still didn't work.

CodePudding user response:

You should use different IDE to run your Java Code because VS Code doesn't support many features, try: intellij, eclipse,...

Otherwise, please follow the instruction in: https://code.visualstudio.com/docs/languages/java

Check current JDK in your computer by typing following command in cmd:

java --version

CodePudding user response:

Intellij is also good or try to install plugin for java then you will able to run java on vs code.

  • Related