Home » Eclipse Projects » Rich Client Platform (RCP) » Simple Question - How Add External Jar?
|
Re: Simple Question - How Add External Jar? [message #444556 is a reply to message #444555] |
Fri, 17 February 2006 16:55 |
Nick Messages: 34 Registered: July 2009 |
Member |
|
|
hi vincent,
as far as i know, you don't and can't add jars to the eclipse
dependencies list!
the following page might help you:
http://dev.eclipse.org/newslists/news.eclipse.platform/msg48 366.html
i add my external jars the following way:
i have a directory called lib in my plugin containing all my external
jars. i added them to the classpath by using the plugin.xml editor.
(page Runtime)
don't forget to include the lib folder in the binary or source build.
(page Build)
you can also take a look at MANIFEST file. the jars should be listed
here. example:
Bundle-ClassPath: .,
lib/commons-collections-2.1.1.jar,
lib/commons-logging-1.0.4.jar,
lib/hibernate3.jar,
lib/log4j-1.2.9.jar,
lib/mysql-connector-java-3.1.10-bin.jar,
lib/xml-apis.jar
...
hope it helps
cheers,
nick
Vincent schrieb:
>
> I have find why it's impossible to create the jar in a plugin export...
> In fact, when you add a external jar by using buildpath or classpath,
> the jar is not created...
> So, how can i add an external Jar (for exemple, i use an external jar
> for read/write xml files : xstream) which is not in dependencies ?
> Or the inverse question, can i add a jar in eclipse dependencies list?
>
> Thank you very much.
> Vincent
>
>
|
|
| | | |
Re: Simple Question - How Add External Jar? [message #444625 is a reply to message #444608] |
Fri, 17 February 2006 22:56 |
Vincent WUHRLIN Messages: 19 Registered: July 2009 |
Junior Member |
|
|
Hello, yout ideas are really good :) I have try the first idea
(1. by turning the jars into plugins), and it's work a little :).
in fact, i use XStream and all are exported (my plugin and other new
dependency).
But the problem, Xstream use a xpp3 jar to read the xml file, and when i
integrate the two jar in a plugin, the parser crash the application.
(i dont see at all why...)
When i add the two jar by classpath (my old method) its works, but i can't
export... I have tried to create a xstream plugin, which depend of a xpp3
plugin,
but xstream doesn't find xpp3 (such when i forgot to chech the dependency
in the run menu).
So, to conclude, it will work perfectly if i will not to include this
xpp3 plugin... And yhe first idea is very good because i have need this
plugin for several application. If someone have an idea...
Maybe these jar cannot be in a plugin, but if its real i am not lucky...
If someone have an idea, i am so happy :)
Thank you very much.
Vinz
|
|
|
Re: Simple Question - How Add External Jar? [message #444774 is a reply to message #444625] |
Mon, 20 February 2006 17:27 |
Jacob Robertson Messages: 21 Registered: July 2009 |
Junior Member |
|
|
If I understand you correctly, the problem is that you now need to create
the xpp3 plugin, and then in your xstream manifest.mf make sure you add that
xpp3 plugin as a required bundle. This is the way we've done it - we have
around 20 of those types of plugins, and it works great - but you have to
excplicitly state in the manifest what bundles they require.
"Vincent" <vwuhrlin@merethis.com> wrote in message
news:76b0e008574c3687c9d0d0fd919d02fc$1@www.eclipse.org...
>
> Hello, yout ideas are really good :) I have try the first idea
> (1. by turning the jars into plugins), and it's work a little :).
> in fact, i use XStream and all are exported (my plugin and other new
> dependency).
> But the problem, Xstream use a xpp3 jar to read the xml file, and when i
> integrate the two jar in a plugin, the parser crash the application.
> (i dont see at all why...)
> When i add the two jar by classpath (my old method) its works, but i can't
> export... I have tried to create a xstream plugin, which depend of a xpp3
> plugin,
> but xstream doesn't find xpp3 (such when i forgot to chech the dependency
> in the run menu).
>
> So, to conclude, it will work perfectly if i will not to include this
> xpp3 plugin... And yhe first idea is very good because i have need this
> plugin for several application. If someone have an idea...
>
> Maybe these jar cannot be in a plugin, but if its real i am not lucky...
>
> If someone have an idea, i am so happy :)
>
> Thank you very much.
> Vinz
>
>
|
|
|
Goto Forum:
Current Time: Tue Nov 12 03:22:38 GMT 2024
Powered by FUDForum. Page generated in 0.02781 seconds
|