Return-Path: X-Original-To: apmail-felix-dev-archive@www.apache.org Delivered-To: apmail-felix-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 70AEFDC63 for ; Mon, 29 Oct 2012 08:04:31 +0000 (UTC) Received: (qmail 85926 invoked by uid 500); 29 Oct 2012 08:04:30 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 85864 invoked by uid 500); 29 Oct 2012 08:04:29 -0000 Mailing-List: contact dev-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list dev@felix.apache.org Received: (qmail 85842 invoked by uid 99); 29 Oct 2012 08:04:29 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Oct 2012 08:04:29 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [217.70.183.195] (HELO relay3-d.mail.gandi.net) (217.70.183.195) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Oct 2012 08:04:22 +0000 X-Originating-IP: 217.70.178.150 Received: from mfilter22-d.gandi.net (mfilter22-d.gandi.net [217.70.178.150]) by relay3-d.mail.gandi.net (Postfix) with ESMTP id 1BC3BA8077 for ; Mon, 29 Oct 2012 09:04:02 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mfilter22-d.gandi.net Received: from relay3-d.mail.gandi.net ([217.70.183.195]) by mfilter22-d.gandi.net (mfilter22-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id GQld6Kme2qqz for ; Mon, 29 Oct 2012 09:04:00 +0100 (CET) X-Originating-IP: 82.238.224.4 Received: from [192.168.134.15] (bre91-1-82-238-224-4.fbx.proxad.net [82.238.224.4]) (Authenticated sender: jb@nanthrax.net) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 747B9A80A2 for ; Mon, 29 Oct 2012 09:04:00 +0100 (CET) Message-ID: <508E386C.5030108@nanthrax.net> Date: Mon, 29 Oct 2012 09:03:56 +0100 From: =?ISO-8859-1?Q?Jean-Baptiste_Onofr=E9?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121011 Thunderbird/16.0.1 MIME-Version: 1.0 To: dev@felix.apache.org Subject: Re: Fwd: [osgi-blog] [OSGi Alliance Blog] 4.3 Companion Code for Java 7 References: <20cf3010e66155771904ccfb03ce@google.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org FYI, the 4.3.1 artifacts have not yet been deployed on Central. Regards JB On 10/29/2012 09:00 AM, Felix Meschberger wrote: > FYI in case you missed it. > > In short: The OSGi R 4.3 libraries have been recompiled with Java 5 tar= get and republished as version 4.3.1 to maven. So to use OSGi R 4.3 libra= ries in a Java 5 (and up) environment you should use the 4.3.1 version de= pendency. > > Nothing to be done when using older (4.2.0 and before) dependencies bec= ause they are compiled for Java 1.4. > > Regards > Felix > > Anfang der weitergeleiteten E-Mail: > > Von: BJ Hargrave > > Betreff: [osgi-blog] [OSGi Alliance Blog] 4.3 Companion Code for Java 7 > Datum: 26. Oktober 2012 21:06:11 MESZ > An: "osgi-blog@mail.osgi.org" > > Antwort an: Private list for OSGi blog discussion > > > Starting in version 4.3, OSGi started to use generics in some of the AP= I including the Core specification. Generics were introduced to the Java language in Java 5. Howev= er, OSGi needed to continue to support embedded use cases which use the C= DC/Foundation 1.1 runtime which is still based upon the Java 1.4 language= level and JVM. To address this issue, OSGi compiled the APIs with -targe= t jsr14; an undocumented javac flag introduced before Java 5 was final. So w= e had the best of both worlds: we can use generics and still compile to r= un on Java 1.4 based runtimes. > > This worked for Java 5 and Java 6. But when Java 7 shipped, two things = changed: javac no longer understood the jsr14 option to -target and javac= refused to recognize the attributes containing the generics information = in class files already compiled with -target jsr14. The change to no long= er support creating -target jsr14 class files was ok; we could continue t= o compile with Java 6 javac. But the change to the javac to cease to reco= gnize the class file attributes with the generics information in existing= class files was a bigger problem. It meant that the 4.3 API jars publish= ed by OSGi were not useable by people who need to compile with Java 7 jav= ac. By not useable, I mean javac treated the classes as if they did not c= ontain any generics information: they were raw. A bug was filed against Java to see = if this was some mistake or oversight. The reply was that the change was = intentional. > > At the time this was first noticed, Java 7 was new and not too widely used. OS= Gi also included the source code in the jars so you could recompile the c= ode yourself if you needed. Later, when it came time to ship Core R5, we = changed to compile the API classes with -target 1.5 and so they work fine= on Java 7. So problem solved; the new release's jars don't use -target j= sr14! Except some of the current OSGi implementations (I'm looking at you= Felix and Karaf) a= re still based upon Core 4.3 and thus people using those implementations = still need to use the Core 4.3 API. And if they also want to use Java 7, = they need to recompile the OSGi API source. So after some prodding by a f= ew folks, OSGi rebuilt the Core and Compendium API jars as Core 4.3.1= and Compendium 4.3.1. The new jars have the sam= e packages at the same package versions having the same API signatures. T= hey are just not compiled with -target jsr14 so they work fine with Java = 7. > > So if you need to use the 4.3 API with Java 7, pick up these new 4.3.1 = jars. They should also be available on maven shortly. > > -- > Posted By BJ Hargrave to OSGi Alliance Blog at 10/26/2012 07:06:00 PM __________= _____________________________________ > osgi-blog mailing list > osgi-blog@mail.osgi.org > https://mail.osgi.org/mailman/listinfo/osgi-blog > > --=20 Jean-Baptiste Onofr=E9 jbonofre@apache.org http://blog.nanthrax.net Talend - http://www.talend.com