在树莓派4上安装eclipse时出错



当我在树莓派4上安装eclipse时。Eclipse没有打开并显示错误消息。我该如何解决这个问题?


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

----------日志

!SESSION Mon Aug 24 07:10:02 BST 2020 ------------------------------------------
!ENTRY org.eclipse.equinox.launcher 4 0 2020-08-24 07:10:02.586
!MESSAGE Exception launching the Eclipse Platform:
!STACK
java.lang.ClassNotFoundException: org.eclipse.core.runtime.adaptor.EclipseStarter
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
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)

您可以尝试使用以下参数执行eclipse

eclipse -clean -console -consoleLog -debug

这将列出配置和要加载的JAR文件。

例如:org.eclipse.core.runtime.adaptor.EclipseStarter来自/usr/lib/eclipse/configuration/config.ini 中的osgi.framework=file:plugins/org.eclipse.osgi_3.81.dist.jar

这样我们就可以通过键入命令来检查是否存在

ls /usr/lib/eclipse/plugins/org.eclipse.osgi_3.8.1.dist.jar

如果不存在文件,请尝试使用sudo updatedb更新文件位置,然后使用locate org.eclipse.osgi

在这里,它将列出一些JAR文件,尝试使用pcmanfm打开每个JAR文件,并检查是否存在org/eclipse/core/runtime/adapter/EclipseStarter.class。

即,我发现/usr/share/java/or.eclipse.osgi.nb.jar包含EclipseStarter.class因此,它将通过命令创建符号链接来解决这个问题

sudo ln -s /usr/share/java/org.eclipse.osgi.nb.jar plugins/org.eclipse.osgi_3.8.1.dist.jar

或者,只需修改osgi.framework以指向/usr/share/java/Or.eclipse.osgi.nb.jar

最新更新