|
Re: Add jar into feature needs to plugin installation but NoClassDefFoundError [message #185196 is a reply to message #185164] |
Wed, 20 December 2006 20:13 |
Eclipse User |
|
|
|
Originally posted by: wharley.bea.com
"Sophie" <Sophie.Andrieu@xrce.xerox.com> wrote in message
news:8c8c51fd2f7a7fd7fc49fa9fbfd9487b$1@www.eclipse.org...
> Hello,
>
> I'm developping a feature for a plugin and in my feature I create an
> Install handler class in order to execute some code at the plugin
> installation.
> The MyInstallHandler class and the plugin installation is correctly
> executed...
> Now, I modify the MyInstallHandler class and I need now some externals jar
> which are dom4j-1.6.1.jar and jaxen-1.1-beta-6.jar : I include them into
> the Java Build Path property project and I add them into the Binary Build
> of the Build tab of feature.xml.
The jars need to be contained within your plug-in, or else they need to be
wrapped in plug-ins of their own. Eclipse won't load code from external
jars at runtime, at least not without a lot of extra effort.
There are a few tips at
http://wiki.eclipse.org/index.php/Plug-in_Development_Enviro nment.
|
|
|
Re: Add jar into feature needs to plugin installation but NoClassDefFoundError [message #185308 is a reply to message #185196] |
Thu, 21 December 2006 08:48 |
Sophie Andrieu Messages: 38 Registered: July 2009 |
Member |
|
|
Thanks for your help... But I have the same error...
I do the following things :
* Within the plugin project :
As you says, I add the two jars within the plugin project like :
- within the Runtime tab, I add dom4j-1.6.1.jar and jaxen-1.1-beta-6.jar
into the classpath.
- within the Build configuration, I select the two jars into the Binary
Build
Thus, the MANIFEST.MF has a Bundle-ClassPath like :
Bundle-ClassPath: lib/dom4j-1.6.1.jar,
lib/jaxen-1.1-beta-6.jar,
.,
* Within the feature project, the organization is :
myplugin.feature
|- src
|- installhandler
|- MyInstallHandler.java
|- feature.xml
|- build.properties
|- installhandler.jar // it's the jar of MyInstallHandler.java
This feature reference the plugin project (which is added within the
Plug-ins and Fragments tab).
The feature.xml file is :
<feature
id="myplugin.feature"
label="myplugin.feature"
version="1.0.1"
provider-name=""
plugin="myplugin">
<install-handler library="installhandler.jar"
handler="installhandler.MyInstallHandler"/>
<description>
My plugin
</description>
<copyright>
</copyright>
<license>
Yes, you agree.
</license>
<requires>
<import plugin="org.eclipse.ui"/>
<import plugin="org.eclipse.core.runtime"/>
<import plugin="org.eclipse.core.resources"/>
<import plugin="org.eclipse.debug.core"/>
</requires>
<plugin
id="myplugin"
download-size="0"
install-size="0"
version="1.0.1"/>
</feature>
I don't know why it's not run... and why classes are not found...
Thanks
|
|
|
Re: Add jar into feature needs to plugin installation but NoClassDefFoundError [message #185463 is a reply to message #185308] |
Thu, 21 December 2006 21:10 |
Eclipse User |
|
|
|
Originally posted by: wharley.bea.com
"Sophie" <Sophie.Andrieu@xrce.xerox.com> wrote in message
news:a323b819c1b945149bd19cbe491afab6$1@www.eclipse.org...
> Thanks for your help... But I have the same error...
>
> I do the following things :
>
> * Within the plugin project :
> As you says, I add the two jars within the plugin project like :
> - within the Runtime tab, I add dom4j-1.6.1.jar and jaxen-1.1-beta-6.jar
> into the classpath.
> - within the Build configuration, I select the two jars into the Binary
> Build
> Thus, the MANIFEST.MF has a Bundle-ClassPath like :
> Bundle-ClassPath: lib/dom4j-1.6.1.jar,
> lib/jaxen-1.1-beta-6.jar,
> .,
>
When the plug-in is installed, does it still contain the jar files? That
is, does the installed plug-in have a lib/ directory, and are
dom4j-1.6.1.jar and jaxen-1.1-beta-6.jar present in that directory?
|
|
|
Powered by
FUDForum. Page generated in 0.08695 seconds