启动 Eclipse 时出现 java.lang.ClassNotFoundException 错误

3

在使用dpkg(Ubuntu)清除并重新安装eclipse后,会出现以下错误:

cat     /home/sergiy/.eclipse/org.eclipse.platform_3.7.0_155965261/configuration/1337883707989.log
!SESSION Thu May 24 21:21:48 EEST 2012 -----------------------------------------
!ENTRY org.eclipse.equinox.launcher 4 0 2012-05-24 21:21:48.242
!MESSAGE Exception launching the Eclipse Platform:
!STACK
java.lang.ClassNotFoundException: org.eclipse.core.runtime.adaptor.EclipseStarter
    at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1410)

下面是 /usr/lib/eclipse/configuration/config.ini 文件:

#This configuration file was written by:     org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxFwConfigFileParser
#Wed Apr 04 13:29:31 UTC 2012
org.eclipse.update.reconcile=false
eclipse.p2.profile=PlatformProfile
osgi.instance.area.default=@user.home/workspace
osgi.framework=file\:plugins/org.eclipse.osgi_3.7.2.dist.jar
equinox.use.ds=true
eclipse.buildId=I20110613-1736
osgi.bundles=reference\:file\:org.eclipse.equinox.simpleconfigurator_1.0.200.dist.jar@1\:start
org.eclipse.equinox.simpleconfigurator.configUrl=file\:org.eclipse.equinox.simpleconfigurator/bundles.info
eclipse.product=org.eclipse.platform.ide
osgi.splashPath=platform\:/base/plugins/org.eclipse.platform
osgi.framework.extensions=
osgi.bundles.defaultStartLevel=4
eclipse.p2.data.area=@config.dir/../p2/
eclipse.application=org.eclipse.ui.ide.workbench
osgi.bundlefile.limit=100

如何解决这个问题?提前致谢!

澄清一下:这不是与您编写的代码无关的问题,而是在(重新)安装Eclipse时遇到的问题,对吗? - apnorton
这个问题应该发布在Ubuntu SE上。 - Thorbjørn Ravn Andersen
anorton:是的,在启动时遇到了闪屏显示问题。 - Serhii Matrunchyk
2个回答

6

首要建议是不要从任何Linux包管理器或软件库安装Eclipse。相反,只需从http://www.eclipse.org/downloads/获取它。Linux发行版安装的版本通常被修改(有人会说是搞砸了)。


同意你的观点。但无论如何,出于兴趣 - 什么可能会导致问题? - Serhii Matrunchyk
1
@SergeyMatrunchik,我不知道可能是什么原因,也不知道Ubuntu存储库对标准Eclipse做了什么。我看到很多人报告使用从Linux软件包安装的Eclipse时出现问题,99%的情况下,使用来自www.eclipse.org的官方Eclipse版本解决了这些问题。 - E-Riz

0

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接