无法启动CDT:java.lang.ClassNotFoundException:org.eclipse.core.runtime.adaptor.EclipseStarter

时间:2019-02-27 13:38:44

标签: eclipse eclipse-cdt

我试图在Ubuntu 18.04 LTS下使用Eclipse CDT。 我和其他许多人都遇到了相同的错误,但是我在阅读中找不到解决方法。

我尝试用

启动
$ eclipse &
OpenJDK 64-Bit Server VM warning: Ignoring option MaxPermSize; support was removed in 8.0

我明白了

/home/user1/.eclipse/org.eclipse.platform_3.8_155965261/configuration/1551271296090.log

在检查/usr/lib/eclipse/configuration/config.ini时(按照this),我发现以下几行(以及其他内容)

osgi.framework=file\:plugins/org.eclipse.osgi_3.8.1.dist.jar
osgi.bundles=reference\:file\:org.eclipse.equinox.simpleconfigurator_1.0.301.dist.jar@1\:start
org.eclipse.equinox.simpleconfigurator.configUrl=file\:org.eclipse.equinox.simpleconfigurator/bundles.info

关于前两行,我有文件

$ locate eclipse.osgi_
/usr/share/java/org.eclipse.osgi_3.8.1.dist.jar

$ locate simpleconfigurator_1
/usr/lib/eclipse/plugins/org.eclipse.equinox.simpleconfigurator_1.0.301.dist.jar

尽管如此:

  1. /usr/share/java/org.eclipse.osgi_3.8.1.dist.jar似乎不属于任何软件包(某些旧软件包的残余?),因为

    $ apt-file search /usr/share/java/org.eclipse.osgi_3.8.1.dist.jar
    

    没有结果。

  2. 我有3.9.1版

    $ dpkg -l | grep libequinox-osgi-java
    ii  libequinox-osgi-java                          3.9.1-1                               all          Equinox OSGi framework
    $ dpkg -L libequinox-osgi-java
    /.
    /usr
    /usr/share
    /usr/share/doc
    /usr/share/doc/libequinox-osgi-java
    /usr/share/doc/libequinox-osgi-java/changelog.Debian.gz
    /usr/share/doc/libequinox-osgi-java/copyright
    /usr/share/java
    /usr/share/java/org.eclipse.osgi-3.9.1.jar
    /usr/share/maven-repo
    /usr/share/maven-repo/org
    /usr/share/maven-repo/org/eclipse
    /usr/share/maven-repo/org/eclipse/osgi
    /usr/share/maven-repo/org/eclipse/osgi/org.eclipse.osgi
    /usr/share/maven-repo/org/eclipse/osgi/org.eclipse.osgi/3.9.1
    /usr/share/maven-repo/org/eclipse/osgi/org.eclipse.osgi/3.9.1/org.eclipse.osgi-3.9.1.pom
    /usr/share/maven-repo/org/eclipse/osgi/org.eclipse.osgi/debian
    /usr/share/maven-repo/org/eclipse/osgi/org.eclipse.osgi/debian/org.eclipse.osgi-debian.pom
    /usr/share/java/org.eclipse.osgi.jar
    /usr/share/maven-repo/org/eclipse/osgi/org.eclipse.osgi/3.9.1/org.eclipse.osgi-3.9.1.jar
    /usr/share/maven-repo/org/eclipse/osgi/org.eclipse.osgi/debian/org.eclipse.osgi-debian.jar
    

所以我不知道问题是否在这里。

我该如何解决?

在这里找不到答案

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=891956

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=898086

https://bugs.launchpad.net/ubuntu/+source/eclipse/+bug/1754886

https://ubuntu.pkgs.org/16.04/ubuntu-universe-i386/libequinox-osgi-java_3.8.1-8_all.deb.html

https://askubuntu.com/questions/1031171/eclipse-doesnt-start-on-ubuntu-18-04

1 个答案:

答案 0 :(得分:1)

您可能使用的是较旧的Eclipse版本,不适用于Java 9或更高版本

  

If using Java 9 or newer please use Eclipse 4.7.1a or newer as it contains fixes in Eclipse launcher to add all JVM modules.

执行以下操作之一以解决问题: