On 09/04/2008, Tim Moloney <[EMAIL PROTECTED]> wrote: > > I'm currently developing a set of bundles using Java SE 6, Maven, Eclipse, > and Q4E. At the command line, everything appears to be working fine. > However, I get some odd errors inside Eclipse (errors concerning generics > and missing symbols which are in JAXB generated code). One of the good > people on the Q4E mailing list said that these errors are probably due to > org.osgi.foundation providing some java.* classes which are version 1.4 or > earlier. > > - What is the purpose of org.osgi.foundation since the framework needs to > be run by a JRE that provides the java.* classes?
I haven't had much experience of actually using the foundation jar AFAIK it's mainly used to compile against - to check whether you're using any API calls outside of the foundation execution environment but you're free to ignore this and compile against a different JVM EE such as Java5 if that's what you want - ie. foundation is just another spec'd execution environment like Java5 SE or Java1.4 EE - Is it possible to create bundles that use Java 5+ features (like generics, > additional collections classes, etc.)? certainly, we have several Java5 bundles at OPS4J and even some that we provide for both 5 and 1.4 runtimes by using retrotranslator - How can I correctly build and run bundles using these newer features? it's mostly just a matter of configuring the maven-compile-plugin to use the right source and target (ie. 1.5) and then ensuring you use a Java5 runtime to deploy it on - you should also pick the right EE in Eclipse (not sure which panel this is on) I realize that these are fundamental questions but I appear to be missing > the fundamentals. Is there is documentation available that can help be get > a good understanding of exactly what's going on here? perhaps you could post the exception/error you're seeing and which tool it comes from (maven plugin / Eclipse / Felix) - I can't quite see how the foundation jar could cause errors in JAXB generated code... Thanks, > Tim > > -- Cheers, Stuart