Problem Executing Plugin [message #260230] |
Wed, 27 May 2009 09:38  |
Eclipse User |
|
|
|
Hello Guys,
My excuses if here is the wrong place to post this question.
I have develop a plugin and requires other .jar files to work.
I have read that plugins can only use .jar files in other plugins. For
that reason i searched the web and read the following articles from these
sites:
http://www.eclipsezone.com/eclipse/forums/t54726.html
http://eclipsewiki.editme.com/PDEFaq
(The third sub-heading: How do I add a third-party JAR to a plugin
classpath?)
I have tried both ways but it seems it is still not working.
This is how i did it:
1)
I have my original project in the workspace with name "com.proj.company"
2)
I created another project with name "tryxml" according to what the links
above suggests
3)
I go to the "Dependencies" tab of my original project (com.proj.comp) and
add the "tryxml" project to the required plug-ins.
4)
After that in the same tab, i go to the imported packages part and click
on the "add..." button but i can't see the .jar files(the .jar files i
created plugin from in the "tryxml" project) in the list, to be able to
add them to the imported packages.
I don't really know what am doing wrong here.
Can someone help me to give me a step by step way of achieving it. I need
a step by step way or a pointer to a tutorial which can give me a step by
step way of making it work.
The whole question is am developing a plugin and my plugin needs other
jar files to be able to work. So kindly tell me what to do so that after
i compile the original project and get a new instance of eclipse the
pluing will work.
Thank you very much.
|
|
|
Re: Problem Executing Plugin [message #260235 is a reply to message #260230] |
Wed, 27 May 2009 11:48   |
Eclipse User |
|
|
|
"Gary Oliver" <win1for@yahoo.com> wrote in message
news:378dc3da417229133274afe778c5018e$1@www.eclipse.org...
> Hello Guys,
>
> My excuses if here is the wrong place to post this question.
>
> I have develop a plugin and requires other .jar files to work.
>
> I have read that plugins can only use .jar files in other plugins.
You can also include the jar file in your own plugin. It's just that you
can't reference a jar file that is not in any plugin at all.
> 4)
> After that in the same tab, i go to the imported packages part and click
> on the "add..." button but i can't see the .jar files(the .jar files i
> created plugin from in the "tryxml" project) in the list, to be able to
> add them to the imported packages.
Did you export the jar's packages from the tryxml project? See the
'Runtime' tab of the plugin manifest editor.
> Can someone help me to give me a step by step way of achieving it. I need
> a step by step way or a pointer to a tutorial which can give me a step by
> step way of making it work.
> The whole question is am developing a plugin and my plugin needs other jar
> files to be able to work. So kindly tell me what to do so that after i
> compile the original project and get a new instance of eclipse the pluing
> will work.
It really depends on whether these are jar files that you can include with
your product or not; this depends on how the jars are licensed. And, it
depends on whether you want the jar file's packages to be available to
multiple other plugins or if you just need it in your own plugin.
If you just need it in your own plugin, and you are legally permitted to
include the jar file as part of your plugin, then that's the easiest way.
Just copy the jar file into your plugin project (you might want to create a
'lib' folder to put it in), add it to the Java build path (using the
'Libraries' tab of the Java Build Path project properties dialog), and make
sure that you include it when you export the plugin (that is, make sure it's
checked in the Binary Build pane on the Build tab of the plugin manifest
editor).
|
|
|
|
|
|
Re: Problem Executing Plugin [message #260250 is a reply to message #260235] |
Wed, 27 May 2009 13:12   |
Eclipse User |
|
|
|
Thanks for your great response.
I have done exactly what you described in your third point. Actually am
using the "xmlrpc-client-3.1.jar" in my eclipse appliction.
When i run the code, it executes untill the line before the class which
uses the clsses in the xlmrpc client jar file. For example :
I have a class called "Connection" which uses the class "XmlClent" (this
class is in the xmlrpc-client-3.1.jar). So my code executes untill the
line before i called the "Connection" class.
//...
System.out.println("sdfdfdfdfddfd");
Connection con = new Connection();
con.connect();
//...
My code executes to the print statement and it stops meaning the
"XmlClent" class cannot be found and so the Connection class which
contains the "XmlClent" class is never executed.
In the classpath side of the "Runtime" tab i included the '.' and the
library but still it is not working.
Should i do something in the "Order and Export" tab of the build path
window of the project? How should that tab look like. May be i have to do
something there.
Thanks.
Walter wrote:
"Gary Oliver" <win1for@xxxxxxxx> wrote in message
news:378dc3da417229133274afe778c5018e$1@xxxxxxxxe.org...
Hello Guys,
My excuses if here is the wrong place to post this question.
I have develop a plugin and requires other .jar files to work.
I have read that plugins can only use .jar files in other plugins.
You can also include the jar file in your own plugin. It's just that you
can't reference a jar file that is not in any plugin at all.
4)
After that in the same tab, i go to the imported packages part and click
on the "add..." button but i can't see the .jar files(the .jar files i
created plugin from in the "tryxml" project) in the list, to be able to
add them to the imported packages.
Did you export the jar's packages from the tryxml project? See the
'Runtime' tab of the plugin manifest editor.
Can someone help me to give me a step by step way of achieving it. I need
a step by step way or a pointer to a tutorial which can give me a step by
step way of making it work.
The whole question is am developing a plugin and my plugin needs other jar
files to be able to work. So kindly tell me what to do so that after i
compile the original project and get a new instance of eclipse the pluing
will work.
It really depends on whether these are jar files that you can include with
your product or not; this depends on how the jars are licensed. And, it
depends on whether you want the jar file's packages to be available to
multiple other plugins or if you just need it in your own plugin.
If you just need it in your own plugin, and you are legally permitted to
include the jar file as part of your plugin, then that's the easiest way.
Just copy the jar file into your plugin project (you might want to create
a
'lib' folder to put it in), add it to the Java build path (using the
'Libraries' tab of the Java Build Path project properties dialog), and
make
sure that you include it when you export the plugin (that is, make sure
it's
checked in the Binary Build pane on the Build tab of the plugin manifest
editor).
|
|
|
|
|
Re: Problem Executing Plugin [message #260262 is a reply to message #260259] |
Wed, 27 May 2009 17:48  |
Eclipse User |
|
|
|
"Walter Harley" <eclipse@cafewalter.com> wrote in message
news:gvjv7e$5or$1@build.eclipse.org...
> You might want to simplify things and explore some simple test cases, in
> order to reduce the number of unknowns. For instance, make a jar file of
> your own that contains one class, say "test.Foo", and see if you can
> include it in a "Hello World" plug-in project and reference it from an
> action - like, replace the "Hello World" text with "Hello " +
> XmlClient.class.getName().
Sorry, clearly I meant Foo.class.getName().
|
|
|
Powered by
FUDForum. Page generated in 0.06690 seconds