Eclipse or STS : Failed to create the Java Virtual Machine

Eclipse or STS : Failed to create the Java Virtual Machine,第1张

Failed to create the Java Virtual Machine
  • 发生错误的情景
    • 错误如图
  • 导致错误的原因
    • 系统升级
  • 解决方式
    • 修改配置文件

发生错误的情景

离职在家有段时间了,今天打开了关闭一个月的电脑发现STS打不开了,Eclipse一样,都是同一个错误

楼主的开发环境如下:

MacOS Monterey :

  • Version 12.3

Spring Tool Suite :

  • Version: 3.9.0.RELEASE
  • Build Id: 201707061823
  • Platform: Eclipse Oxygen (4.7.0)
错误如图


导致错误的原因 系统升级

楼主的原因是因为升级电脑系统导致的
MacOS:10.15.7 --> MacOS Monterey :12.3

其他原因导致的错误,如下方式不一定能解决

解决方式 修改配置文件

1.右键STS或Eclipse->Show Package Contents->打开文件 Contents/Info.plist

2.to use a specific Java version (instead of the platform’s default) uncomment one of the following options,or add a VM found via
(译: 要使用特定的Java版本(而不是平台的默认版本),请取消注释以下选项之一,或添加通过)

根据注释内容修改为本地的jdk路径,Windows系统同理,在开发工具的安装目录下找到Info.plist修改即可。如果没有改段注释 也可以手动添加

<string>-vm</string>
<string>/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/bin/java</string>



欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/langs/737778.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-04-28
下一篇 2022-04-28

发表评论

登录后才能评论

评论列表(0条)

保存