I'm developing an Eclipse plugin, and want to use some pre-compiled classes which I've put to lib/
folder in my project (so the directory structure looks like {proj_root}/lib/com/example/Required.class
). Then I've added lib/
folder as class folder to project's build path. At build time all is working fine, I can import and use that classes in my code. And now the problem is, when I'm running my plugin in separate Eclipse instance I get ClassNotFoundException
by my plugin refering to class from precompiled classes folder.
I tried specifying my class folder in "Order and export" tab in Build path settings. Also I tried setting checkbox in plugin's build.properties GUI editor in front of lib/
folder to be included in binary build. In that case if I export my plugin to JAR I can see lib/
folder inside it, with my classfiles, but at runtime my plugin still cannot find any of classes from lib/
.
The class folder 'lib/' is not associated to any output library entry.
and suggests to make this modification of code:
output.. = bin/,lib/
. I have tried that solution but it is seems to change nothing with the problem.It sounds very much like you have added the lib
folder to the "Java Build Path" properties page of the plug-in project.
But... for plug-in projects, this does not work as these are OSGi bundles - you must include the lib
folder in the PDE Editor on the "Runtime" page: