1. 安装java 文档
    2. 配置VSCode code runner

    首选项中,更改

    1. "code-runner.executorMap": {
    2. "javascript": "node",
    3. "php": "C:\\php\\php.exe",
    4. "python": "python",
    5. "perl": "perl",
    6. "ruby": "C:\\Ruby23-x64\\bin\\ruby.exe",
    7. "go": "go run",
    8. "html": "\"C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe\"",
    9. "java": "cd $dir && javac -encoding utf-8 $fileName && java $fileNameWithoutExt",
    10. "c": "cd $dir && gcc $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
    11. "cpp": "cd $dir && g++ -std=c++11 $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt"
    12. },
    13. "code-runner.runInTerminal": true

    见文档:vscode code runner配置

    1. cmd 更改默认编码为utf-8

    chcp 65001