Java – the Eclipse Plug-in cannot find a class from the class folder

I am developing an eclipse plug-in and want to use some pre compiled classes. I have put these classes in the Lib / folder in my project (so the directory structure looks like {proj_root} / lib / COM / example / required. Class) Then I add the Lib / folder as a class folder to the project's build path At build time, everything is fine, and I can import and use these classes in my code The problem now is that when I run my plug-in in a separate eclipse instance, my plug-in references classnotfoundexception and classes in the precompiled classes folder I try to specify my class folder in the "order and export" tab in build path settings In addition, I try to build the plug-in in front of the Lib / folder Set the check box in the properties GUI editor to include in the binary build In this case, if I export my plug-in to jar, I can see the Lib / folder and use my class file, but my plug-in still can't find any classes in lib / at run time Can you tell me how to tell where eclipse can find these classes at runtime?

>I studied stack overflow on this issue, but all the suggestions are the same: just add the class folder in the build path of the project. > At this point in the plug-in's build In the properties text editor, eclipse displays a warning that the class folder 'lib /' is not associated with any output library entries It is suggested to modify the code: output= bin /,lib /. I've tried this solution, but it doesn't seem to change the problem

Solution

This sounds very much like you have added the Lib folder to the "Java build path" property page of the plug-in project

But... For plug-in projects, this doesn't work because these are OSGi packages – you must include the Lib folder in the PDE editor of the runtime page:

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>