[英]Eclipse RCP java.lang.ClassNotFoundException: org.eclipse.core.runtime.adaptor.EclipseStarter
I use Eclipse 4.3.0 to develop plugins/RCP. 我使用Eclipse 4.3.0开发插件/ RCP。 While trying to do RCP product following Plug-in development 101, Part 2: Introducing rich-client applications http://www.ibm.com/developerworks/library/os-eclipse-plugindev2/ by Chris Aniszczyk 2008, I got error below when clicking Launch an Eclipse application
from .product
Overview Tab. 在尝试按照插件开发101,第2部分:由Chris Aniszczyk 2008介绍富客户端应用程序http://www.ibm.com/developerworks/library/os-eclipse-plugindev2/进行RCP产品时,我收到以下错误单击从.product
Overview选项卡Launch an Eclipse application
。
!SESSION Wed Jan 15 13:06:51 CST 2014 ------------------------------------------
!ENTRY org.eclipse.equinox.launcher 4 0 2014-01-15 13:06:51.085
!MESSAGE Exception launching the Eclipse Platform:
!STACK
java.lang.ClassNotFoundException: org.eclipse.core.runtime.adaptor.EclipseStarter
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
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:633)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
More info 更多信息
Notes: there were no rcp.product
option in Use existing product
(I consider it was definite mistake in tutorial) 注意: Use existing product
没有rcp.product
选项(我认为教程中存在明确错误)
plugin.xml
content plugin.xml
内容
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension
id="application"
point="org.eclipse.core.runtime.applications">
<application>
<run
class="rcp4.Application">
</run>
</application>
</extension>
<extension
point="org.eclipse.ui.perspectives">
<perspective
name="Perspective"
class="rcp4.Perspective"
id="rcp4.perspective">
</perspective>
</extension>
<extension
point="org.eclipse.ui.views">
<view
name="View"
class="rcp4.View"
id="rcp4.view">
</view>
</extension>
<extension
point="org.eclipse.ui.perspectiveExtensions">
<perspectiveExtension
targetID="*">
<view
standalone="true"
minimized="false"
relative="org.eclipse.ui.editorss"
relationship="left"
id="rcp4.view">
</view>
</perspectiveExtension>
</extension>
<extension
point="org.eclipse.ui.menus">
<menuContribution
locationURI="menu:org.eclipse.ui.main.menu">
<menu
label="File">
<command
commandId="org.eclipse.ui.file.exit"
label="Exit">
</command>
</menu>
</menuContribution>
</extension>
<extension
id="product"
point="org.eclipse.core.runtime.products">
<product
application="rcp4.application"
name="RCP4 Product Name">
<property
name="appName"
value="RCP4 Product Name">
</property>
</product>
</extension>
</plugin>
rcp.product content
<?xml version="1.0" encoding="UTF-8"?>
<?pde version="3.5"?>
<product name="RCP4 Product Name" uid="id" id="rcp4.product" application="rcp4.application" version="0.4.0" useFeatures="false" includeLaunchers="true">
<configIni use="default">
</configIni>
<launcherArgs>
<vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
</launcherArgs>
<plugins>
</plugins>
</product>
If you are using a .product
file you must add all the plugin or feature dependencies on the Dependencies
tab. 如果您使用的是.product
文件,则必须在Dependencies
选项卡上添加所有插件或功能依赖项。 Your rcp.product
file currently has no dependencies so nothing will be found! 您的rcp.product
文件当前没有依赖项,因此找不到任何内容! There is an Add Required
button on the tab which should add everything required. 选项卡上有一个Add Required
按钮,它应该添加所需的所有内容。
Note: That tutorial looks like it is using an older version of the product file which had dependencies on the Configuration tab. 注意:该教程看起来使用的是产品文件的旧版本,该文件依赖于“配置”选项卡。
Update: To get the correct dependencies first add your own plugin, then press Add Required
which will add a lot of additional plugins. 更新:要获得正确的依赖项,首先添加自己的插件,然后按Add Required
,这将添加许多其他插件。 For a very similar plugin (with a different name) on Eclipse 4.3.1 I get: 对于Eclipse 4.3.1上非常相似的插件(具有不同的名称),我得到:
<?xml version="1.0" encoding="UTF-8"?>
<?pde version="3.5"?>
<product application="TestRCPView.application" useFeatures="false" includeLaunchers="true">
<configIni use="default">
</configIni>
<launcherArgs>
<vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
</launcherArgs>
<plugins>
<plugin id="TestRCPView"/>
<plugin id="com.ibm.icu"/>
<plugin id="javax.annotation"/>
<plugin id="javax.inject"/>
<plugin id="javax.xml"/>
<plugin id="org.apache.batik.css"/>
<plugin id="org.apache.batik.util"/>
<plugin id="org.apache.batik.util.gui"/>
<plugin id="org.eclipse.core.commands"/>
<plugin id="org.eclipse.core.contenttype"/>
<plugin id="org.eclipse.core.databinding"/>
<plugin id="org.eclipse.core.databinding.observable"/>
<plugin id="org.eclipse.core.databinding.property"/>
<plugin id="org.eclipse.core.expressions"/>
<plugin id="org.eclipse.core.jobs"/>
<plugin id="org.eclipse.core.runtime"/>
<plugin id="org.eclipse.core.runtime.compatibility.registry" fragment="true"/>
<plugin id="org.eclipse.e4.core.commands"/>
<plugin id="org.eclipse.e4.core.contexts"/>
<plugin id="org.eclipse.e4.core.di"/>
<plugin id="org.eclipse.e4.core.di.extensions"/>
<plugin id="org.eclipse.e4.core.services"/>
<plugin id="org.eclipse.e4.ui.bindings"/>
<plugin id="org.eclipse.e4.ui.css.core"/>
<plugin id="org.eclipse.e4.ui.css.swt"/>
<plugin id="org.eclipse.e4.ui.css.swt.theme"/>
<plugin id="org.eclipse.e4.ui.di"/>
<plugin id="org.eclipse.e4.ui.model.workbench"/>
<plugin id="org.eclipse.e4.ui.services"/>
<plugin id="org.eclipse.e4.ui.widgets"/>
<plugin id="org.eclipse.e4.ui.workbench"/>
<plugin id="org.eclipse.e4.ui.workbench.addons.swt"/>
<plugin id="org.eclipse.e4.ui.workbench.renderers.swt"/>
<plugin id="org.eclipse.e4.ui.workbench.renderers.swt.cocoa" fragment="true"/>
<plugin id="org.eclipse.e4.ui.workbench.swt"/>
<plugin id="org.eclipse.e4.ui.workbench3"/>
<plugin id="org.eclipse.emf.common"/>
<plugin id="org.eclipse.emf.ecore"/>
<plugin id="org.eclipse.emf.ecore.change"/>
<plugin id="org.eclipse.emf.ecore.xmi"/>
<plugin id="org.eclipse.equinox.app"/>
<plugin id="org.eclipse.equinox.common"/>
<plugin id="org.eclipse.equinox.ds"/>
<plugin id="org.eclipse.equinox.event"/>
<plugin id="org.eclipse.equinox.preferences"/>
<plugin id="org.eclipse.equinox.registry"/>
<plugin id="org.eclipse.equinox.util"/>
<plugin id="org.eclipse.help"/>
<plugin id="org.eclipse.jface"/>
<plugin id="org.eclipse.jface.databinding"/>
<plugin id="org.eclipse.osgi"/>
<plugin id="org.eclipse.osgi.services"/>
<plugin id="org.eclipse.swt"/>
<plugin id="org.eclipse.swt.cocoa.macosx.x86_64" fragment="true"/>
<plugin id="org.eclipse.ui"/>
<plugin id="org.eclipse.ui.workbench"/>
<plugin id="org.w3c.css.sac"/>
<plugin id="org.w3c.dom.smil"/>
<plugin id="org.w3c.dom.svg"/>
</plugins>
</product>
apt autoremove eclipse* --purge
apt autoremove libosgi* --purge
If you have, then remove this bloatware too: 如果有,那么也删除这个英国媒体报道:
apt autoremove libmaven* --purge
apt autoremove libsisu* --purge
And then install back: 然后安装回来:
apt install eclipse-cdt
You will get C++ indexer as well. 您也将获得C ++索引器。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.