我在分析Citrix Windows 10 VDI在VS code中运行任何java代码时遇到了一个令人讨厌的问题。
操作系统:win10 20H2
VS Code 1.56.2
Java JDK 16(也安装了8,但16设置为主)
已安装的扩展:Java的扩展包,Java的语言支持,Java的maven, Java的项目管理器,Java的测试运行器
扩展该问题仅在非管理员用户试图运行任何java代码时发生。管理员级用户没有此问题。
示例代码…
import java.util.scanner;
public class stuff{
public static void main(string[]args){
System.out.println("whatever else");
/* Scanner keyboard = new Scanner(System.in);
String junk = keyboard.next();
System.out.println("here it is"+junk); */
System.out.println("wow.");
}
}
即使不运行代码,也会出现以下错误:
The Language Support for Java crashed 5 times in the last 3 minutes. the server will not be restarted
日志:
{ message: 'WARNING: Using incubator modules: jdk.incubator.foreign, jdk.incubator.vectorrn',
level: 'info',
timestamp: '2021-10-25 15:39:02.151'
} { message: 'The Language Support for Java server crashed and will restart.',
level: 'error',
timestamp: '2021-10-25 15:39:05.387' } { message: '[Info - 3:39:05 p.m.] Connection to server got closed. Server will restart.',
level: 'info',
timestamp: '2021-10-25 15:39:05.388' }
我已经尝试提升VsCode安装文件夹的权限,但是因为java扩展是每个用户-我不确定哪个文件夹需要有正确的提升。
任何帮助都将不胜感激
不要做任何事情
第一,卸载所有扩展
imp -不要卸载语言扩展
然后重新启动操作系统