Hello Richard,
the output comes from the bnd tool. I use eclipse.
I configured my environment in that way, that every single
java project becomes an osgi-bundle. If i compile a class
the bnd tool is called immediatly to create the appropriate jar - file.
As i played around with LookAndFeels and osgi i figured
out some classloading problems. Aspecially when is use the
LipstikLookAndFeel. A general solution for problems like that
was to add the packages of the lookandfeel classes to the
system packages .
So i configured them in the felix config file :
org.osgi.framework.system.packages.extra= \
com.lipstikLF, com.lipstikLF.delegate, com.lipstikLF.icons,
com.lipstikLF.theme, \
com.lipstikLF.util
Ok. Now my first bundle creates some swing elements and of curse
it sets the lookandfeel. Everything works fine here .
The bnd file looks like this :
Bundle-Version: 1.0.0
Export-Package: org.jine.desktop;version=1.0.0
Private-Package: org.jine.desktop.impl
Bundle-Name: org.jine.desktop
Bundle-SymbolicName: JineDesktop
Bundle-Activator: org.jine.desktop.impl.JineDesktopActivator
Bundle-Vendor: AnM
After running the bnd tool on my project, the bundles
manifest contains the following :
Bundle-ManifestVersion 2
Bundle-Name org.jine.desktop
Bundle-SymbolicName JineDesktop
Bundle-Vendor AnM
Bundle-Version 1.0.0
Created-By 1.6.0_13 (Sun Microsystems Inc.)
Export-Package
org.jine.desktop;uses:="javax.swing,org.osgi.framework,sun.swing";version="1.0.0"
Import-Package
com.lipstikLF,com.lipstikLF.theme,com.lipstikLF.util,javax.swing,javax.swing.border,javax.swing.plaf,javax.swing.plaf.basic,org.apache.log4j,org.jine.desktop;version="1.0",org.osgi.framework;version="1.4",sun.swing
Manifest-Version 1.0
Private-Package org.jine.desktop.impl
Tool Bnd-0.0.313
So as we can see, the lipstik packages have been added by bnd.
Now i created a second bundle - project which, for testing, also
wants to use some lookandfeel classes :
The bnd file :
Bundle-Version: 1.0.0
Import-Package: org.jine.desktop;javax.swing;org.osgi.framework
Export-Package: org.jine.shell;version=1.0.0
Private-Package: org.jine.shell.impl
Bundle-Name: org.jine.shell
Bundle-SymbolicName: JineShell
Bundle-Activator: org.jine.shell.impl.JineShellActivator
Bundle-Vendor: AnM
and the generated manifest :
Bundle-ManifestVersion 2
Bundle-Name org.jine.shell
Bundle-SymbolicName JineShell
Bundle-Vendor AnM
Bundle-Version 1.0.0
Created-By 1.6.0_13 (Sun Microsystems Inc.)
Export-Package org.jine.shell;version="1.0.0"
Import-Package
javax.swing,org.apache.log4j,org.jine.desktop,org.osgi.framework;version="1.4"
Manifest-Version 1.0
Private-Package org.jine.shell.impl
Tool Bnd-0.0.313
So it seems to be an bnd issue. The second bundle manifest
does not contain the lookandfeel packages as packages to import .
After i added the questionable package by hand, everything works fine :).
Thanks for your answer .
Best regards .
Andreas .
-------- Original-Nachricht --------
> Datum: Mon, 10 Aug 2009 16:14:50 -0400
> Von: "Richard S. Hall" <[email protected]>
> An: [email protected]
> Betreff: Re: Can\'t use configured system package in other bundles
> What is this output from? BND?
>
> Are you sure your bundle imports these packages? How are you setting up
> your bundle's imports?
>
> -> richard
>
> On 8/10/09 15:52, Andreas Mucha wrote:
> > Hello all,
> >
> > i observed some behaviour i can't understand.
> > I configured some additional system package to use the Lipstik LF.
> > I configured the following in the felix configuration file :
> >
> > org.osgi.framework.system.packages.extra= \
> > com.lipstikLF, com.lipstikLF.delegate, com.lipstikLF.icons,
> com.lipstikLF.theme, \
> > com.lipstikLF.util
> >
> > But what i don't understand ist the fact, that i can only use
> > the classes of the additional system packages in one bundle.
> > If i try to use classes from these packages in other bundles
> > i get :
> >
> > One error
> > 1 : Unresolved references to [com.lipstikLF.util] by class(es) on the
> Bundle-Classpath[Jar:dot]: [org/.../impl/MyActivator.class]
> >
> > So i really dont know, why i can use the classes from my additional
> > system package in one bundle and in other bundles not.
> >
> > Many thanks in advance.
> > Andreas .
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
--
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]