Including jar from Plugin [message #666210] |
Tue, 19 April 2011 09:41  |
Eclipse User |
|
|
|
Hello everyone,
I have got a problem accessing a class from a jar.
I created a java project and added the package test.helloworld
In this package I created the Class Greeter,
then exported the project as a jar (not runnable).
After that I created a plugin test.plugin and imported the jar into the project. I added it to the build path. The Manifest:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Plugin
Bundle-SymbolicName: test.plugin
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: test.plugin.Activator
Require-Bundle: org.eclipse.core.runtime
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Export-Package: test.helloworld
Bundle-ClassPath: moin.jar,
.
To use this with other plugins I deployed the plugin and added it to my target platform.
Now I can add the plugin as dependency to the other plugin, or i can import the exported package, but when I try to import the Greeter class eclipse tells me that it cannot resolve the package.
What am I doing wrong here?
Greetings,
David
|
|
|
Re: Including jar from Plugin [message #666380 is a reply to message #666210] |
Wed, 20 April 2011 04:47  |
Eclipse User |
|
|
|
Ok, looks like i found my mistake.
It is not enough to add the plugin with the packed jar to the target definition. It also has to be in the workspace so that eclipse can compile the depending plugins.
In the deployed version it is enough to have the dependency to the jar plugin in the feature, the plugin itself needs not to be included.
|
|
|
Powered by
FUDForum. Page generated in 0.03057 seconds