[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] How to best simulate standalone Equinox deployment in Eclipse

Hey Robert, 

I think we need some more information here.  You should not have to mess with the system packages settings etc.  I've been using javax and org.xml etc for years and have never had to do this.  What Alex says may be required in cases where you are going for internal/private JRE classes (e.g., com.sun) but the system bundle exports all these packages for you so all you have to do is import the packages in your bundles.  This is the way the OSGi spec expects things to work.  That is, you should Import-Package for all packages you need other than java.* (which you get for free).  If you do this you should get all the right compile errors etc.

Jeff



On 2010-11-19, at 11:53 AM, Robert Krüger wrote:

> 
> Hi,
> 
> I'm going through the (so far rather painful) process of trying to deploy my OSGI app developed within Eclipse 3.6 in a standalone Equinox environment for the first time.
> 
> The two main things I ran into were having to specify javax.* and other packages included in the JavaSE (like org.xml.sax.*) in org.osgi.framework.system.packages and adding Import-Package entries for these in the respective bundles. The former is not too bad as this only has to be done once. However the latter is a bit tedious in the development process if I always have to go through the export, run, change in IDE, rerun cycle.
> 
> How is this done best, from a productivity point of view? Is there a way to configure an eclipse OSGI run configuration in such a way that it behaves like the standalone environment, i.e. throws Exceptions/Errors on classes not imported or even better have the compiler mark this as an error? How does the fact that I have Bundle-RequiredExecutionEnvironment: JavaSE-1.6 specified for all bundles affect all this? What do I have to do to be able to test this realistically within Eclipse?
> 
> Thanks in advance for sharing any hints in this matter.
> 
> Regards,
> 
> Robert   
> 
> 
> 
> _______________________________________________
> equinox-dev mailing list
> equinox-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/equinox-dev