Hi, Am Donnerstag, den 03.02.2011, 11:09 +0000 schrieb Shigekuni Kondo: > Dear Felix Experts, > > > I would like to run Felix OSGi framework and bundles > on JVM 1.4 or CDC FP1.1. > > However, following bundles cannot be started on JVM 1.4 > because "java.lang.UnsupportedClassVersionError" is occurred. > It seems that the bundles are compiled to be compatible with JAVA 5. > > Apache Felix Http Jetty (Version 2.0.4) > Apache Felix Http Bundle (Version 2.0.4) > Apache Felix Http Bridge (Version 2.0.4) > Apache Felix Http Whiteboard (Version 2.0.4) > > ----- > ERROR: Error starting file:./bundles/org.apache.felix.http.bundle-2.0.4.jar > (org.osgi.framework.BundleException: Activator start error in bundle > org.apache.felix.http.bundle [20].) > java.lang.UnsupportedClassVersionError: > org/apache/felix/http/bundle/internal/CombinedActivator (Unsupported > major.minor version 49.0) > ----- > > [Question] > 1. Are the bundles implemented to be compatible with only > JVM 1.5 or JVM 1.6?
The bundles use generics and I would even assume Java 5 API. So yes, these bundles only work with 1.5 and newer. > > 2. If the answer of 1 is "NO", I will compile them to be > compatible with JVM 1.4 on Maven. However, I cannot find > the setting file for maven compiler plugin in felix trunk. > (In fact, I don't know how to.) > Could you please inform me the procedure? I use Maven 3.0.1. The compiler setting is the parent pom of the http bundles inside trunk/http. You might want to change the target setting to the largely undocumented jsr14 setting, which generates Java 1.4 class files while still supporting Java 5 syntax if at all possible. Of course you still have the problems with used Java 5 API. In addition, for the Jetty case: I am not sure whether the included Jetty 6 runs on pre-Java 5 platforms. Hope this helps ... and please report back if you have success. Thanks. Regards Felix > > > Best regards, > > Shigekuni Kondo > > _____________________________________________ > > Shigekuni Kondo > > Promotion Project 1 > NTT Cyber Solutions Laboratories > NIPPON TELEGRAPH AND TELEPHONE CORPORATION > > 1-1 Hikarinooka Yokosuka > Kanagawa 239-0847 Japan > TEL:+81-46-859-3444 > FAX:+81-46-855-1282 > E-mail:[email protected] > _____________________________________________ > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

