[sip-comm-dev] a problem when launching a browser in sipcomm

pin nie peternick13 at gmail.com
Tue Sep 18 17:19:28 CEST 2007


Hi,
Thanks for your reply.
I found the tricky and solved the problem already. Still, very appreciate
your help.

BR

niepin

On 9/18/07, Koch Michael <MKoch at rowa.de> wrote:
>
> Hi!
>
> > I got a problem when I try to launch a browser in sipcomm.
> > Here is a part of my code:
> >  if (osName.startsWith("Mac OS")) {
> >             Class fileMgr =
> > Class.forName("com.apple.eio.FileManager");
> >             Method openURL = fileMgr.getDeclaredMethod("openURL",
> >                new Class[] {String.class});
> >             openURL.invoke(null, new Object[] {url});
> > }
> >
> > Here is the error infor I got:
> > BrowserLaunch exception: *** Class 'com.apple.eio.FileManager' was not
> > found because bundle 35 does not import 'com.apple.eio' even though
> > bundle 0 does export it. Additionally, the class is also available
> > from the system class loader. There are two fixes: 1) Add an import
> > for 'com.apple.eio' to bundle 35; imports are necessary for each class
> > directly touched by bundle code or indirectly touched, such as super
> > classes if their methods are used. 2) Add package 'com.apple.eio' to
> > the 'org.osgi.framework.bootdelegation' property; a library or VM bug
> > can cause classes to be loaded by the wrong class loader. The first
> > approach is preferable for preserving modularity. ***
> >
> > It is strange, coz com.apple.eio is included in the
> > felix.client.run.properties already?
> > what is the bundle??
>
> With the OSGI framework, not only do you have to export the class
> com.apple.eio.FileManager from the system classpath by adding it to the
> org.osgi.framework.system.packages property in the
> felix.client.run.properties, you also have to add it to the import
> property
> of the bundle in which you are using the class. The bundles are packaged
> in
> the jar files which are generated in the sc-bundles dir. Their properties
> are set in the *.manifest.mf files in the src/../impl/.. directories. So
> for
> example, if you've added your code to the GUI bundle, you have to add the
> com.apple.eio.FileManager class to the Import-Package entry in
> src/../impl/gui/swing.ui.manifest.mf.
>
> I hope this helps.
> Regards
> Michael Koch
>
>


-- 
BR
NIE PIN
TML at HUT, Helsinki, Finland
ANTD at NIST, Gaithersburg, USA
Ph: +1 (301)975-6049
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.jitsi.org/pipermail/dev/attachments/20070918/c9bf768a/attachment.html>


More information about the dev mailing list