从jdk8更换到jdk11导致STS/Eclipse打开时报错

jdk8更换到jdk11因jdk版本太高导致STS/Eclipse报错

没有找到.metadata.log.文件

通过查看该log文件发现启动时发生了如下错误:
org.eclipse.e4.core.di.InjectionException: java.lang.NoClassDefFoundError:

解决方法:

在STS/Eclipse的安装位置下找到STS.iniEclipse.ini在里面加上如下内容,将jdk指定为java 1.8

-vm
D:\jdk1.8.0_221\bin

STS加入后效果:

-startup
plugins/org.eclipse.equinox.launcher_1.3.200.v20160318-1642.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.400.v20160518-1444
-product
org.springsource.sts.ide
--launcher.defaultAction
openFile
-vm
D:\jdk1.8.0_221\bin
-vmargs
-Dosgi.requiredJavaVersion=1.8
-Xms40m
-Xverify:none
-Dorg.eclipse.swt.browser.IEVersion=10001
-Xmx1200m

Eclipse加入后效果:

-startup
plugins/org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.500.v20170531-1133
-vm
/home/shenfeng/Tools/jdk1.8.0_201/bin/java
-vmargs
-Xmx2G
-Xms200m
-XX:MaxPermSize=384m

保存后,重新启动STS或Eclipse

你可能感兴趣的:(bug记录)