打开Intellij Idea 2020.1 提示 cannot load a jdk class: com.sun.jdi.Field

 最近升级到2020.1,出现cannot load a jdk class: com.sun.jdi.Field

可以直接修改

修改前

    IDEA_JDK_64=C:\Program Files\Java\jdk1.8.0_144

修改后

IDEA_JDK_64=C:\Program Files\JetBrains\IntelliJ IDEA 2019.3.3\jbr

(我的是有2019.3升级到2020.1的,)

转  https://stackoverflow.com/questions/61145290/intellij-idea-doesnt-start-cannot-load-a-jdk-class-com-sun-jdi-field

This issue occurs if you override the default JetBrains Runtime with some other version, IDE saves the location of this runtime under CONFIG\idea64.exe.jdk file and then this runtime becomes invalid (removed or corrupted).

The solution is to delete idea64.exe.jdk/idea.exe.jdk file so that IDE is using the default bundled JetBrains Runtime (the file name could be different depending on the product you are using, so the general guide is to delete *.jdk files in the IDE config directory).

Here is the file that should be deleted for most of the users on Windows:

c:\Users\<user>\AppData\Roaming\JetBrains\IntelliJIdea2020.1\idea64.exe.jdk

The issue occurs when this file points to Java 8 as IntelliJ IDEA no longer runs on Java 8 and is expecting Java 11 instead. Java 11 is already bundled, but this file overrides it, hence the problem.

Please also check this document for the other possible ways to override IDE runtime and make sure none of these is in effect.

Another possible issue is that the bundled runtime in jbr subdirectory becomes corrupted. Verify it by running java -version inside IDE_HOME\jbr\bin. Reinstalling IDE should help.

See also a related discussion in IntelliJ IDEA forum.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值