首页 > 解决方案 > 从收藏夹工具栏 java.lang.ClassNotFoundException 启动 Eclipse 时出错:org.eclipse.core.runtime.adaptor.EclipseStarter

问题描述

当我从目录运行 Eclipse CDT 2018-12 时,它工作得非常好:

/home/fatih/eclipse/cpp-2018-12/eclipse/eclipse

当我将相同的内容(即最近启动的 eclipse 会话)添加到收藏夹工具栏时,我无法通过单击收藏夹工具栏上的 eclipse 图标开始。

我现在的问题是,我怎样才能通过解决这些错误(或这个错误)从收藏夹工具栏开始。

我收到以下错误消息:

An error has occurred.  See the log file
/home/fatih/.eclipse/org.eclipse.platform_3.8_155965261/configuration/1549048971236.log

    !SESSION Fri Feb 01 20:22:51 CET 2019 ------------------------------------------
!ENTRY org.eclipse.equinox.launcher 4 0 2019-02-01 20:22:51.266
!MESSAGE Exception launching the Eclipse Platform:
!STACK

当我打开日志消息时,可以找到以下内容:

java.lang.ClassNotFoundException: org.eclipse.core.runtime.adaptor.EclipseStarter
    at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:626)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1414)

我也关注了这个这个其他线程的内容。但是,这也不能解决我的问题。因此,它也不是这两个线程的两倍。为了完整起见,我还想在下面添加 config.ini 和 eclipse.ini 文件的内容:

配置文件

#This configuration file was written by: org.eclipse.oomph.p2.internal.core.AgentImpl
#Fri Feb 01 19:51:30 CET 2019
eclipse.product=org.eclipse.platform.ide
osgi.splashPath=file\:/home/fatih/.p2/pool/plugins/org.eclipse.platform_4.10.0.v20181206-0815
org.eclipse.equinox.simpleconfigurator.configUrl=file\:org.eclipse.equinox.simpleconfigurator/bundles.info
osgi.bundles.defaultStartLevel=4
eclipse.application=org.eclipse.ui.ide.workbench
osgi.instance.area.default=@user.home/workspace
osgi.bundles=reference\:file\:/home/fatih/.p2/pool/plugins/org.eclipse.equinox.simpleconfigurator_1.3.200.v20181101-1115.jar@1\:start
eclipse.p2.data.area=file\:/home/fatih/.p2/
eclipse.p2.profile=_home_fatih_eclipse_cpp-2018-12_eclipse
osgi.framework=file\:/home/fatih/.p2/pool/plugins/org.eclipse.osgi_3.13.200.v20181130-2106.jar
osgi.framework.extensions=reference\:file\:/home/fatih/.p2/pool/plugins/org.eclipse.osgi.compatibility.state_1.1.300.v20181116-1550.jar
eclipse.buildId=4.10.0.I20181206-0815

日食.ini

-startup
plugins/org.eclipse.equinox.launcher_1.5.200.v20180922-1751.jar
--launcher.library
/home/fatih/.p2/pool/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.900.v20180922-1751
-product
org.eclipse.epp.package.cpp.product
-showsplash
org.eclipse.epp.package.common
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vm
/usr/lib/jvm/java-11-openjdk-amd64/bin
-vmargs
-Dosgi.requiredJavaVersion=1.8
-Dosgi.instance.area.default=@user.home/eclipse-workspace
-XX:+UseG1GC
-XX:+UseStringDeduplication
--add-modules=ALL-SYSTEM
-Dosgi.requiredJavaVersion=1.8
-Dosgi.dataAreaRequiresExplicitInit=true
-Xms256m
-Xmx1024m
--add-modules=ALL-SYSTEM
-Declipse.p2.max.threads=10
-Doomph.update.url=http://download.eclipse.org/oomph/updates/milestone/latest
-Doomph.redirection.index.redirection=index:/->http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/

标签: javaeclipse-cdtubuntu-18.04

解决方案


问题在于 Eclipse 的版本,下载2020-12 版本并导航到下载文件夹并使用以下命令解压缩文件:

tar -xvf eclipse-inst-jre-linux64.tar.gz

现在进入eclipse-installer文件夹并输入:

./eclipse-inst

这将提示安装程序,然后您就可以继续了。


推荐阅读