> From: Mike Wilson <[email protected]> > Are there any good references to the thinking behind what > classes are allowed to use, and not to use, in OSGi APIs?
The best "reference" would be the OSGi Minimum Execution Environment. See section 999 on the OSGi Compendium Release 5 specification. By limiting APIs to use types in ee.minimum, we know the APIs will be usable on Java SE 1.4 and later including Java ME CDC-1.1/Foundation-1.1 (which is used by OSGi users in embedded environments.) > > And what about having optional parts of OSGi APIs that may > use classes from a wider range of execution environments? In a specification, we try to minimize optionality since it makes it harder for bundle implementors. Some of the specifications do require later versions of Java if their underlying technology does. But we generally try to limit API usage to types in ee.minimum for the broadest reach. We do use generics in some API because we know we can compile with older javac compiler with -target jsr14 to support Java ME CDC-1.1/Foundation-1.1 VMs. Those classes are compiled with -target 1.5 in the normally distributed companion code jars so they can be used in Java SE 1.7 (and later) build environments since Java SE 1.7 javac ceased to recognize -target jsr14 class files. -- 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
_______________________________________________ OSGi Developer Mail List [email protected] https://mail.osgi.org/mailman/listinfo/osgi-dev
