如何让 VS Code 使用 Javac 而不是 g++ 编译我的 Java,同时仍然让我编译 C++ 的东西?
我有 JDK 和 JSK,JDK 里面有一个 Javac.exe...
我的 Launch.json 是:
"version": "0.2.0",
"configurations": [
{
"name": "g++.exe build and debug active file",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerPath": "C:\\MinGW\\bin\\gdb.exe",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "g++.exe build active file"
}
]
哦...它正在尝试使用 g++ 进行构建,因为那是 PreLaunchTask...所以我必须为“java”进行另一个配置...但我不知道该怎么做...
MYYA
相关分类