1、如果想运行ut,得需要java projects那里正确加载:
2、设置jdk是前提:
3、打开setting,点击那个button,变成json格式:
4、添加:
"java.configuration.runtimes": [
{
"name": "JavaSE-1.8",
"path": "/Library/Java/JavaVirtualMachines/amazon-corretto-8.jdk/Contents/Home",
},
{
"name": "JavaSE-11",
"path": "/Library/Java/JavaVirtualMachines/amazon-corretto-11.jdk/Contents/Home",
},
{
"name": "JavaSE-17",
"path": "/Users/wjsu/Library/Java/JavaVirtualMachines/corretto-17.0.11/Contents/Home",
"default": true
},
],
jdk设置完毕。
转载请注明:牛哥678 » vscode-jdk-setting