Re: Where to put a Swing-specific jar to be accessible by a running plugin using SWT_SWING component [message #448015] |
Thu, 23 December 2004 22:55 |
Eclipse User |
|
|
|
Originally posted by: no.ddress.here
In article <cqf12p$9cr$1@www.eclipse.org>, ifedorenko@rogers.com says...
> Gerald B. Rosenberg wrote:
> > In article <MPG.1c2fa704e07eb88f98968a@news.eclipse.org>, no@ddress.here
> > says...
> >
> >>I have developed a plugin that embeds some Swing UI components in SWT in
> >>an otherwise standard Eclipse view. The Swing UI components have a
> >>dependency on the JGoodies looks.jar.
> >>
> >>The question is, where is the "correct" place to put the looks.jar to be
> >>accessible to the plugin when installed as a normal plugin. Note, no
> >>problem in developing the plugin - identifying the dependency in
> >>plugin.xml works. Its just when my plugin (including a copy of the
> >>looks.jar) is installed in the .../eclipse/plugins directory, the jar is
> >>not found; the plugin fails with a ComponentUI reference not found error
> >>- the necessary component UIs being in the looks.jar.
> >>
> >>So, putting the jar in my plugin directory (in the same relative
> >>location as used in development) does not work. Putting the looks.jar
> >>on either the system or user CLASSPATH does not work. Putting the jar
> >>in the Eclipse home directory does not work.
> >>
> >>The only location that I have found that works is the .../jre/lib/ext
> >>directory of the SDK that Eclipse is using.
> >>
> >>Is there a better place/way to provide the looks.jar as part of my
> >>plugin?
> >>
> >>Eclipse 3.1M3, SDK1.4.2, XP.
> >>
> >>Thanks,
> >>Gerald
> >>
> >
> >
> > Any thoughts on this would be appreciated.
>
> Each eclipse plugin has its own classloader that "sees" classes from
> plugin's "run time libraries" as well as from required plugins. That
> means that at least you need to add the looks.jar to runtime section of
> plugin.xml (or Bundle-ClassPath elntry of manifest.mf).
Thanks very much for the response.
I do have the looks.jar listed in the "Run-time libraries" list. And, it
does then show up in the MANIFEST.MF as
Bundle-ClassPath: JDocEditor.jar, log4j-1.2.8.jar, looks-1.2.2.jar
> I am not swing
> expert but I guess that you also need to set thread context classloader
> to your plugin classloader for swing libs to see looks.jar.
Not sure how or where to do something like this. Not even sure where to
begin. Any chance you could provide a bit more explanation?
Thanks,
Gerald
(Cross-posting to the swt forum just in case this is more of a swt/swing
issue than a plugin/platform issue)
|
|
|
Re: Where to put a Swing-specific jar to be accessible by a running plugin using SWT_SWING component [message #448020 is a reply to message #448015] |
Fri, 24 December 2004 06:57 |
Igor Fedorenko Messages: 14 Registered: July 2009 |
Junior Member |
|
|
This wiki page might help: http://eclipsewiki.editme.com/PDEFaq#context
Gerald B. Rosenberg wrote:
> In article <cqf12p$9cr$1@www.eclipse.org>, ifedorenko@rogers.com says...
>
>>Gerald B. Rosenberg wrote:
>>
>>>In article <MPG.1c2fa704e07eb88f98968a@news.eclipse.org>, no@ddress.here
>>>says...
>>>
>>>
>>>>I have developed a plugin that embeds some Swing UI components in SWT in
>>>>an otherwise standard Eclipse view. The Swing UI components have a
>>>>dependency on the JGoodies looks.jar.
>>>>
>>>>The question is, where is the "correct" place to put the looks.jar to be
>>>>accessible to the plugin when installed as a normal plugin. Note, no
>>>>problem in developing the plugin - identifying the dependency in
>>>>plugin.xml works. Its just when my plugin (including a copy of the
>>>>looks.jar) is installed in the .../eclipse/plugins directory, the jar is
>>>>not found; the plugin fails with a ComponentUI reference not found error
>>>>- the necessary component UIs being in the looks.jar.
>>>>
>>>>So, putting the jar in my plugin directory (in the same relative
>>>>location as used in development) does not work. Putting the looks.jar
>>>>on either the system or user CLASSPATH does not work. Putting the jar
>>>>in the Eclipse home directory does not work.
>>>>
>>>>The only location that I have found that works is the .../jre/lib/ext
>>>>directory of the SDK that Eclipse is using.
>>>>
>>>>Is there a better place/way to provide the looks.jar as part of my
>>>>plugin?
>>>>
>>>>Eclipse 3.1M3, SDK1.4.2, XP.
>>>>
>>>>Thanks,
>>>>Gerald
>>>>
>>>
>>>
>>>Any thoughts on this would be appreciated.
>>
>>Each eclipse plugin has its own classloader that "sees" classes from
>>plugin's "run time libraries" as well as from required plugins. That
>>means that at least you need to add the looks.jar to runtime section of
>>plugin.xml (or Bundle-ClassPath elntry of manifest.mf).
>
>
> Thanks very much for the response.
>
> I do have the looks.jar listed in the "Run-time libraries" list. And, it
> does then show up in the MANIFEST.MF as
>
> Bundle-ClassPath: JDocEditor.jar, log4j-1.2.8.jar, looks-1.2.2.jar
>
>
>>I am not swing
>>expert but I guess that you also need to set thread context classloader
>>to your plugin classloader for swing libs to see looks.jar.
>
>
> Not sure how or where to do something like this. Not even sure where to
> begin. Any chance you could provide a bit more explanation?
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.03484 seconds