简体   繁体   中英

Problem when I am running java code in the terminal in vs code

public class Main {

    public static void main(String[] args) {
        
       // System.out.println("Hello");
        int a = 5,b=6;
        int c = a+b;
        System.out.println(c);
    } 
}

When I am running this code in vscode I am getting my desired result ie 11 but with that I am getting a huge address of a file in my local computer. Can somebody explain the reason behind that?

The output I am getting:-

k:; cd 'k:\JavaBasics'; & 'C:\Program Files\Java\jdk-11.0.10\New Folder\bin\java.exe' '-cp' 'C:\Users\khushal\AppData\Roaming\Code\User\workspaceStorage\a6084cec5acdec0bc4f5c4be0d94ed8a\redhat.java\jdt_ws\JavaBasics_22fbb3a7\bin' 'Main' 11

I am only expecting 11 but why the address of that file

That's the actual command that sending to the terminal. If you do not want to see them, you can update the setting java.debug.settings.console to internalConsole .

Note: If your program needs to consume user input, you still needs to use the integrated terminal. Internal console will not work for that case.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM