gpt4 book ai didi

java - eclipse RCP java.lang.ClassNotFoundException : org. eclipse.core.runtime.adaptor.EclipseStarter

转载 作者:塔克拉玛干 更新时间:2023-11-03 03:48:35 25 4
gpt4 key购买 nike

我使用 Eclipse 4.3.0 开发插件/RCP。在尝试按照插件开发 101 进行 RCP 产品时,第 2 部分:富客户端应用程序简介 http://www.ibm.com/developerworks/library/os-eclipse-plugindev2/作者 Chris Aniszczyk,2008 年,从 .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)

更多信息

注意:Use existing product 中没有rcp.product 选项(我认为这绝对是教程中的错误)

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.产品内容

<?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>

最佳答案

如果您使用的是 .product 文件,则必须在 Dependencies 选项卡上添加所有插件或功能依赖项。您的 rcp.product 文件目前没有依赖项,因此不会找到任何内容!选项卡上有一个 Add Required 按钮,可以添加所需的所有内容。

注意:该教程看起来像是在使用旧版本的产品文件,该文件依赖于“配置”选项卡。

更新:要获得正确的依赖项,请先添加您自己的插件,然后按 Add Required 这将添加很多额外的插件。对于 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>

关于java - eclipse RCP java.lang.ClassNotFoundException : org. eclipse.core.runtime.adaptor.EclipseStarter,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21129773/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com