Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Problem Executing Plugin
Problem Executing Plugin [message #260230] Wed, 27 May 2009 09:38 Go to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
"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 #260238 is a reply to message #260230] Wed, 27 May 2009 11:50 Go to previous messageGo to next message
Eclipse UserFriend
"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. For
> that reason i searched the web and read the following articles from these
> sites:

Oh, never mind, I see you posted the same question in a different newsgroup
as well, using a different name.
Re: Problem Executing Plugin [message #260242 is a reply to message #260238] Wed, 27 May 2009 12:30 Go to previous messageGo to next message
Eclipse UserFriend
Walter Harley wrote:
> Oh, never mind, I see you posted the same question in a different newsgroup
> as well, using a different name.

Yeah, I thought that question rang a bell. What's up with that? I'll see
if I can find out what that is all about. Is waterboarding still legal?

Best,
Dann
Re: Problem Executing Plugin [message #260245 is a reply to message #260238] Wed, 27 May 2009 12:40 Go to previous messageGo to next message
Eclipse UserFriend
Walter,

These are desperate times for some, but an entire team hiding behind the
same Yahoo account?

Here it's 'Eddy Freeman':
http://dev.eclipse.org/mhonarc/lists/jdt-core-dev/msg01835.h tml

Perhaps he just forgot to take his meds ;) Multiple Personality
Disorder, or something ;)

Best,
Dann



Walter Harley wrote:
> "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. For
>> that reason i searched the web and read the following articles from these
>> sites:
>
> Oh, never mind, I see you posted the same question in a different newsgroup
> as well, using a different name.
>
>
Re: Problem Executing Plugin [message #260250 is a reply to message #260235] Wed, 27 May 2009 13:12 Go to previous messageGo to next message
Eclipse UserFriend
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 #260255 is a reply to message #260245] Wed, 27 May 2009 13:20 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

We are a team using the same account in order to avoid reposting the
same question and also to track our posts.

So don't worry if you see different names with the same account. It was
just a mistake that a colleague posted the same question in the other
newsgroup.

You can help us in both posts but we are concenrating now on one. We are
sorry for any inconveniences.

Thanks.
Re: Problem Executing Plugin [message #260259 is a reply to message #260250] Wed, 27 May 2009 14:02 Go to previous messageGo to next message
Eclipse UserFriend
"Gary Oliver" <win1for@yahoo.com> wrote in message
news:28b2838dcc4947602897c87189e328c4$1@www.eclipse.org...
> 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.

I'm sure it doesn't "stop." Presumably it throws an exception. What is the
exception?

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().


> 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.

No, that would only matter if you were exporting the jar to be used by other
plugins.
Re: Problem Executing Plugin [message #260262 is a reply to message #260259] Wed, 27 May 2009 17:48 Go to previous message
Eclipse UserFriend
"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().
Previous Topic:How to set the output directory for the compiler?
Next Topic:Re: export jars with referenced jars
Goto Forum:
  


Current Time: Wed May 07 13:32:27 EDT 2025

Powered by FUDForum. Page generated in 0.06690 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top