> import f1; 
> SomeClassFromF1 x = new SomeClassFromF1(); 

will work fine. And package imports/exports do not matter (at runtime) 
since F1 and F2 are loaded by the same class loader and have full 
visibility to each other.

As Tom observed, how to get the Eclipse IDE to deal with this is a PDE 
issue that should be raised in the PDE mail list/newsgroup.
-- 

BJ Hargrave
Senior Technical Staff Member, IBM
OSGi Fellow and CTO of the OSGi Alliance
[EMAIL PROTECTED]

office: +1 386 848 1781
mobile: +1 386 848 3788





From:
Jens Borrmann <[EMAIL PROTECTED]>
To:
OSGi Developer Mail List <[email protected]>
Date:
2008/08/01 08:27 AM
Subject:
Antwort: Re: [osgi-dev] Inter-fragment dependencies




Hi BJ, 

thanks for your answer. What I figured out is that the following code 
snippet works in F2: 

Object x = this.getClass().getClassLoader().loadClass("f1.SomeClassFromF1"
).newInstance(); 

Is there a possibility to write something in F2 like: 

import f1; 
SomeClassFromF1 x = new SomeClassFromF1(); 

assuming that F1 exports f1 and F2 imports f1. I have tried all my eclipse 
tricks but still the IDE won't let me do this... 

Best regards, Jens 





BJ Hargrave <[EMAIL PROTECTED]> 
Gesendet von: [EMAIL PROTECTED] 
31.07.2008 14:15 

Bitte antworten an
OSGi Developer Mail List <[email protected]>


An
OSGi Developer Mail List <[email protected]> 
Kopie

Thema
Re: [osgi-dev] Inter-fragment dependencies









H, F1 and F2 are all loaded by the same classloader. So any class/resource 
available in H, F1 and F2 should be visible to any class loaded from H, F1 
and F2. 

Since F1 adds the export f1, I assume the package f1 is in F1 and thus is 
visible to H and F2. 
-- 

BJ Hargrave
Senior Technical Staff Member, IBM
OSGi Fellow and CTO of the OSGi Alliance
[EMAIL PROTECTED] 

office: +1 386 848 1781
mobile: +1 386 848 3788





From: 
Jens Borrmann <[EMAIL PROTECTED]> 
To: 
[email protected] 
Date: 
2008/07/31 06:28 AM 
Subject: 
[osgi-dev] Inter-fragment dependencies






Hi, 

given the following situation: A host bundle H, two fragments F1 
(exporting package f1) and F2 attached to H. 

Using eclipse I can not find a way to have access to f1 from within F2? 
Should there be a way? 

Kind regards, Jens_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev 
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev 
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to