0

上一篇:Ubuntu,这样安装Eclipse:

tar -zxvf eclipse.XX.YY.tar.gz
mv eclipse.XX.YY ~/opt
sudo nano /usr/share/applications/eclipse.desktop

[Desktop Entry]
Name=Eclipse
Type=Application
Exec=/home/user/opt/eclipse/eclipse  #watch the directory!
Terminal=false
Icon=/home/usr/opt/eclipse/icon.xpm
Comment=Integrated Development Environment
NoDisplay=false
Categories=Development;IDE
Name[en]=eclipse.desktop

cd /usr/local/bin
ln -s /opt/eclipse/eclipse

之后(我之前有一个工作区)运行 eclipse 会抛出一个错误来读取工作区/.metadata/.log 有人建议删除:/YOUR PATH TO WORKSPACE/.metadata/.plugins/org.eclipse.core.resources like here http://bugsanddebugs.blogspot.com/2010/06/when-eclipse-says-error-has-occurred.html 但运行 eclipse -clean 给出了同样的错误。这篇几乎详尽无遗的文章有点帮助...... http://www.eclipsezone.com/eclipse/forums/t99010.html 但仍然无法理解错误:

~/workspace$ egrep -A 2 "Caused by" ~/workspace/.metadata/.log 
Caused by: org.osgi.framework.BundleException: Exception in org.eclipse.equinox.console.command.adapter.Activator.start() of bundle org.eclipse.equinox.console.
   at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:734)
   at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
--
Caused by: org.osgi.framework.BundleException: Exception in org.apache.felix.gogo.command.Activator.start() of bundle org.apache.felix.gogo.command.
   at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:734)
   at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
--
Caused by: java.lang.NoClassDefFoundError: org.apache.felix.gogo.command.OBR
   at java.lang.Class.initializeClass(libgcj.so.12)
   at org.apache.felix.gogo.command.Activator.start(Activator.java:54)
--
Caused by: java.lang.ClassNotFoundException: org.apache.felix.bundlerepository.Repository
   at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
   at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
--
Caused by: java.lang.ClassNotFoundException: org.apache.felix.bundlerepository.Repository
   at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
   at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)

如何阅读这一切?

4

1 回答 1

0

尝试将 JRE 文件夹复制到 Eclipse 文件夹。它可能会解决问题。无论如何它对我有用。Eclipse 无法启动的原因是它是从旧版本的 JVM 启动的。有关更多详细信息,请参阅此参考:eclipse won't start

于 2013-04-02T08:01:20.753 回答