运行我的eclipse插件结束了ClassNotFoundException [英] Running my eclipse plugin end up with ClassNotFoundException

查看:330
本文介绍了运行我的eclipse插件结束了ClassNotFoundException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试开发一个eclipse插件,向右键菜单添加一个动作。
我已经用plugin.xml创建了一个java项目,并添加了相关的java类,它调用java文件(ActionDelegate)。
当我将此代码作为eclipse应用程序运行时,正在调用该类,并且一切都符合我的预期。

I am trying to develop an eclipse plugin that adds an action to the right click menu. I have created a java project with plugin.xml, and added the related java class that invokes an action on java files(ActionDelegate). When i run this code as "eclipse application", the class is being invoked and everything works as i expected.

问题是当我转换此项目通过eclipse插件项目,以创建插件,并再次运行它作为eclipse应用程序,然后我得到ClassNotFoundException对我所创建的java类。

The problem is when i convert this project to "plug-in project" via eclipse in order to create plug-in, and run it again as "eclipse application", then i get ClassNotFoundException on the java class i have created.

在将该项目转换为插件项目的过程中,eclipse添加了与OSGI软件包相关的MANIFEST.MF。
如果我删除这个文件 - 一切都很好,如果我添加了MANIFEST.MF文件 - 再次我得到上面的ClassNotFoundException,所以可能是有错误的MANIFEST.MF和项目表示为插件。

On the process of converting this project to "plug-in project" eclipse adds a MANIFEST.MF, which related to OSGI bundles. If i remove this file - all works well, and if i add the MANIFEST.MF file - again i get the above ClassNotFoundException, so probably there is something wrong with the MANIFEST.MF and the project representation as plug-in.

此外,当我尝试将此插件导出为可部署的插件和片段并将其安装到主机存储库中时,会收到以下错误:
找不到导出的单位id:MyReloader版本:1.0.0.201304210902。

Also, when i try to export this plug-in as "Deployable plug-ins and fragments" and install it into host Repository i get the following error: Could not find the exported unit with id: MyReloader version: 1.0.0.201304210902.

任何帮助将不胜感激

推荐答案

看起来像是eclipse版本的问题,或者使用jre。
一旦我切换到不同的jre,它工作得很好

looks like it is an eclipse version issue, or jre used. once i switched to a different jre, it worked well

这篇关于运行我的eclipse插件结束了ClassNotFoundException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆