• <i id='0wty3'><tr id='0wty3'><dt id='0wty3'><q id='0wty3'><span id='0wty3'><b id='0wty3'><form id='0wty3'><ins id='0wty3'></ins><ul id='0wty3'></ul><sub id='0wty3'></sub></form><legend id='0wty3'></legend><bdo id='0wty3'><pre id='0wty3'><center id='0wty3'></center></pre></bdo></b><th id='0wty3'></th></span></q></dt></tr></i><div id='0wty3'><tfoot id='0wty3'></tfoot><dl id='0wty3'><fieldset id='0wty3'></fieldset></dl></div>
      <bdo id='0wty3'></bdo><ul id='0wty3'></ul>

        <legend id='0wty3'><style id='0wty3'><dir id='0wty3'><q id='0wty3'></q></dir></style></legend>
        <tfoot id='0wty3'></tfoot>

      1. <small id='0wty3'></small><noframes id='0wty3'>

      2. 实例化 Eclipse 插件时出现 ClassNotFoundException

        时间:2023-08-20
        <i id='5wBwX'><tr id='5wBwX'><dt id='5wBwX'><q id='5wBwX'><span id='5wBwX'><b id='5wBwX'><form id='5wBwX'><ins id='5wBwX'></ins><ul id='5wBwX'></ul><sub id='5wBwX'></sub></form><legend id='5wBwX'></legend><bdo id='5wBwX'><pre id='5wBwX'><center id='5wBwX'></center></pre></bdo></b><th id='5wBwX'></th></span></q></dt></tr></i><div id='5wBwX'><tfoot id='5wBwX'></tfoot><dl id='5wBwX'><fieldset id='5wBwX'></fieldset></dl></div>
        <legend id='5wBwX'><style id='5wBwX'><dir id='5wBwX'><q id='5wBwX'></q></dir></style></legend>
          <tbody id='5wBwX'></tbody>
      3. <small id='5wBwX'></small><noframes id='5wBwX'>

          • <bdo id='5wBwX'></bdo><ul id='5wBwX'></ul>

                <tfoot id='5wBwX'></tfoot>

                • 本文介绍了实例化 Eclipse 插件时出现 ClassNotFoundException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我开发了一个 Eclipse 插件,我正在尝试将它安装在另一个 Eclipse 实例上.当我将插件作为 Eclipse 应用程序运行/调试时,一切正常.只有在我通过我创建的更新站点安装插件后才会出现此问题.

                  I developed an eclipse plugin and I'm trying to install it on another instance of eclipse. When I run/debug my plugin as an eclipse application everything works correctly. The problem occurs only after I install the plugin through the update site I created.

                  我创建了一个非常简单的更新站点,其中包含一个功能,其中包含我的插件.使用更新站点安装后,我可以在 eclipse 安装目录下的 plugin 目录中看到我的插件,它正确包含应该在那里的所有数据(我认为).但是,当我实例化插件时(通过点击我定义的键绑定),我得到了主插件类的 ClassNotFoundException,这是我创建的,可以在我的插件的 bin 目录中找到.

                  I created a very simple update site which includes a single feature with my plugin packaged in it. After installing using the update site I can see my plugin in the plugin directory under the eclipse install dir and it correctly contains all the data that should be in there (I think). However, when I instantiate the plugin (by hitting the key-binding I defined) I get a ClassNotFoundException for the main plugin class, one that I created and that can be found in the bin directory of my plugin.

                  似乎 bin 目录不知何故未被识别为搜索类的地方,但我认为它应该作为插件安装的一部分添加到 eclipse 类路径中.

                  It seems that the bin directory is somehow not recognized as a place to search for classes, but I assume that it should be added to the eclipse classpath as part of the plugin installation.

                  我对此进行了相当多的搜索,并发现了许多相关问题,但没有一个与我的具体情况相当.如有任何建议,我将不胜感激!

                  I googled quite a bit about this and found many related problems, none of which was quite hitting my specific situation. I would appreciate any suggestion!

                  推荐答案

                  当您创建插件时,其他插件只能访问在 Manifest.mf 的 Export-Package 部分中声明的包中的类.打开 plugin.xml 编辑器并查看运行时"选项卡 - 它需要列出您的包.像这样的:

                  When you create a plugin other plugins can only access the classes in packages declared in the Export-Package section of the Manifest.mf. Open the plugin.xml editor and look at the 'Runtime' tab - it needs to have your package listed. Something like this:

                  这篇关于实例化 Eclipse 插件时出现 ClassNotFoundException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:Maven JAVA_HOME 环境变量未正确定义,但它是 下一篇:如何将 IFile 处理程序获取到 Eclipse 编辑器中的活动文件

                  相关文章

                  1. <small id='hI1b8'></small><noframes id='hI1b8'>

                  2. <tfoot id='hI1b8'></tfoot>

                      <legend id='hI1b8'><style id='hI1b8'><dir id='hI1b8'><q id='hI1b8'></q></dir></style></legend>
                        <bdo id='hI1b8'></bdo><ul id='hI1b8'></ul>
                      <i id='hI1b8'><tr id='hI1b8'><dt id='hI1b8'><q id='hI1b8'><span id='hI1b8'><b id='hI1b8'><form id='hI1b8'><ins id='hI1b8'></ins><ul id='hI1b8'></ul><sub id='hI1b8'></sub></form><legend id='hI1b8'></legend><bdo id='hI1b8'><pre id='hI1b8'><center id='hI1b8'></center></pre></bdo></b><th id='hI1b8'></th></span></q></dt></tr></i><div id='hI1b8'><tfoot id='hI1b8'></tfoot><dl id='hI1b8'><fieldset id='hI1b8'></fieldset></dl></div>