You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Christopher BROWN <br...@reflexe.fr> on 2012/02/12 21:57:11 UTC

Java 7 compiler issue

Hello,

I followed the different threads on this subject, such as:
https://mail.osgi.org/pipermail/osgi-dev/2011-August/003224.html
http://www.mail-archive.com/users@felix.apache.org/msg11574.html

My understanding is that if I target the latest OSGi version and multiple
JDK versions, and if I want some (optional) bundles to use JDK7 features,
then for the JDK7 deployments, I'm also going to have to recompile the OSGi
framework instead of using the binaries for download from Apache (that
might be a bit messy if it involves extracting source and rebuilding JARs)
and all bundles that will run on that recompiled framework without the
-jsr14 flag (because mixing and matching won't work)?

Moreover, trying to understand fully the problem, the problem isn't JDK7
specifically, it's the jsr14 flag... If I recompiled Felix *without* this
flag, even on JDK5 or JDK6, I *could* mix and match generic-signature
methods compiled with pre-JDK7 JDKs (but not JDK1.4 or earlier obviously),
is that right?

If my understanding is correct, then could I as of now compile Felix with
JDK6 and be sure that the issue with -jsr14 won't occur, and then add one
or two JDK7 bundles later if required, without any further recompilation?

Is there any documentation on building Felix 4.x in this way?

Thanks,
Christopher

Re: Java 7 compiler issue

Posted by Christian Schneider <ch...@die-schneider.net>.
+1

I only see my solution as transitory as long as the OSGi alliance does 
not release a compatible lib.
For karaf internally it is definately better to have a spec module than 
to include the spec in another module that contains
impl classes and has additional dependencies.

Btw. I already commited a first version and would be happy about feedback.
http://svn.apache.org/repos/asf/karaf/trunk/osgicore/

I also switched the instance.core to this module instead of karaf.main. 
The resulting jar seems to have the same Import-Package statements as 
before so it seems to work well.

Christian

Am 27.04.2012 20:56, schrieb Felix Meschberger:
> Hi,
>
> Am 27.04.2012 um 19:15 schrieb Christian Schneider:
>
>> Hi Richard,
>>
>> thanks for the clarification. I think we will then create a osgi spec
>> project in karaf. So at least inside karaf we have a cleaner build. I
>> will then ask the other committers if we would like
>> to recommend to users to also use the jar to compile on java 7 or not.
> I don't think this is a good idea.
>
> I wonder whether we could ask the OSGi Alliance to produce Java 7 compatible builds of the libraries.
>
> Regards
> Felix
>
>

-- 

Christian Schneider
http://www.liquid-reality.de

Open Source Architect
Talend Application Integration Division http://www.talend.com


Re: Java 7 compiler issue

Posted by Felix Meschberger <fm...@adobe.com>.
Hi,

Am 27.04.2012 um 19:15 schrieb Christian Schneider:

> Hi Richard,
> 
> thanks for the clarification. I think we will then create a osgi spec 
> project in karaf. So at least inside karaf we have a cleaner build. I 
> will then ask the other committers if we would like
> to recommend to users to also use the jar to compile on java 7 or not.

I don't think this is a good idea.

I wonder whether we could ask the OSGi Alliance to produce Java 7 compatible builds of the libraries.

Regards
Felix

> 
> Christian
> 
> Am 27.04.2012 18:39, schrieb Richard S. Hall:
>> On 4/27/12 11:06 , Christian Schneider wrote:
>>> So what is our message to end users?
>>> Should they not use Java 7 at the moment?
>> 
>> Currently, they have to recompile.
>> 
>>> If the R5 spec comes soon and works that may be acceptable but is not 
>>> ideal regarding the resons I wrote.
>> 
>> Yes, it is not ideal, but neither is distributing our own independent 
>> OSGi binaries.
>> 
>> For the Felix framework specfically, I think we will try to roll a 4.2 
>> release shortly that will switch from target jsr14 to Java 5, which 
>> will help a little, since the framework JAR embeds the core OSGi API.
>> 
>> In hindsight, it was a mistake for OSGi to use target jsr14 given that 
>> Java 7 dropped support. Had that been known at the time, a different 
>> decision would likely have been made, which is why R5 will be different.
>> 
>> -> richard
>> 
>>> 
>>> Christian
>>> 
>>> Am 27.04.2012 16:10, schrieb Richard S. Hall:
>>>> On 4/27/12 09:40 , Christian Schneider wrote:
>>>>> In Karaf we currently include the osgi spec jars in karaf.main 
>>>>> which is not such a good solution as they are mixed with impl classes.
>>>>> 
>>>>> So for karaf internally as well as for end users of OSGi developing 
>>>>> on Java 7 it makes sense to have an OSGi spec that is compatible 
>>>>> with Java 7 really soon.
>>>> 
>>>> Just to be clear, the spec is compatible, just the delivered JARs 
>>>> need to be recompiled.
>>>> 
>>>>> I will create such a project in
>>>>> in karaf for the mean time but I would prefer if we could move this 
>>>>> to Felix. End users would expect such an API jar rather from felix 
>>>>> then from Karaf.
>>>> 
>>>> We won't release OSGi artifacts as stand alone. We did that in the 
>>>> past and it caused us more problems that what it was worth.
>>>> 
>>>>> 
>>>>> Even with R5 out it might be a good idea to provide a 4.x spec that 
>>>>> is compatible to Java 7 as developers can use it to express that 
>>>>> they target their development for an OSGi 4.x framework.
>>>>> Especially when using the maven bundle plugin this is important as 
>>>>> it creates the import package version out of the maven artifact 
>>>>> version.
>>>>> 
>>>>> So what do you think about providing the OSGi 4.3 specs in Felix?
>>>> 
>>>> My vote: -1.
>>>> 
>>>> -> richard
>>>> 
>>>>> 
>>>>> Christian
>>>>> 
>>>>> Am 27.04.2012 15:15, schrieb Richard S. Hall:
>>>>>> On 4/27/12 07:33 , Guillaume Nodet wrote:
>>>>>>> Does the OSGi Alliance plan to release a version that can work 
>>>>>>> with jdk 7 ?
>>>>>>> Or could we build one, as we used to provide the core specs 
>>>>>>> before the
>>>>>>> alliance put them in maven central ?
>>>>>> 
>>>>>> I think the R5 JARs will target Java 5, once they are released, 
>>>>>> which should be fairly soon.
>>>>>> 
>>>>>> -> richard
>>>>>> 
>>>>> 
>>> 
>>> 
> 
> 
> -- 
> Christian Schneider
> http://www.liquid-reality.de
> 
> Open Source Architect
> Talend Application Integration Division http://www.talend.com
> 


Re: Java 7 compiler issue

Posted by Christian Schneider <ch...@die-schneider.net>.
Hi Richard,

thanks for the clarification. I think we will then create a osgi spec 
project in karaf. So at least inside karaf we have a cleaner build. I 
will then ask the other committers if we would like
to recommend to users to also use the jar to compile on java 7 or not.

Christian

Am 27.04.2012 18:39, schrieb Richard S. Hall:
> On 4/27/12 11:06 , Christian Schneider wrote:
>> So what is our message to end users?
>> Should they not use Java 7 at the moment?
>
> Currently, they have to recompile.
>
>> If the R5 spec comes soon and works that may be acceptable but is not 
>> ideal regarding the resons I wrote.
>
> Yes, it is not ideal, but neither is distributing our own independent 
> OSGi binaries.
>
> For the Felix framework specfically, I think we will try to roll a 4.2 
> release shortly that will switch from target jsr14 to Java 5, which 
> will help a little, since the framework JAR embeds the core OSGi API.
>
> In hindsight, it was a mistake for OSGi to use target jsr14 given that 
> Java 7 dropped support. Had that been known at the time, a different 
> decision would likely have been made, which is why R5 will be different.
>
> -> richard
>
>>
>> Christian
>>
>> Am 27.04.2012 16:10, schrieb Richard S. Hall:
>>> On 4/27/12 09:40 , Christian Schneider wrote:
>>>> In Karaf we currently include the osgi spec jars in karaf.main 
>>>> which is not such a good solution as they are mixed with impl classes.
>>>>
>>>> So for karaf internally as well as for end users of OSGi developing 
>>>> on Java 7 it makes sense to have an OSGi spec that is compatible 
>>>> with Java 7 really soon.
>>>
>>> Just to be clear, the spec is compatible, just the delivered JARs 
>>> need to be recompiled.
>>>
>>>> I will create such a project in
>>>> in karaf for the mean time but I would prefer if we could move this 
>>>> to Felix. End users would expect such an API jar rather from felix 
>>>> then from Karaf.
>>>
>>> We won't release OSGi artifacts as stand alone. We did that in the 
>>> past and it caused us more problems that what it was worth.
>>>
>>>>
>>>> Even with R5 out it might be a good idea to provide a 4.x spec that 
>>>> is compatible to Java 7 as developers can use it to express that 
>>>> they target their development for an OSGi 4.x framework.
>>>> Especially when using the maven bundle plugin this is important as 
>>>> it creates the import package version out of the maven artifact 
>>>> version.
>>>>
>>>> So what do you think about providing the OSGi 4.3 specs in Felix?
>>>
>>> My vote: -1.
>>>
>>> -> richard
>>>
>>>>
>>>> Christian
>>>>
>>>> Am 27.04.2012 15:15, schrieb Richard S. Hall:
>>>>> On 4/27/12 07:33 , Guillaume Nodet wrote:
>>>>>> Does the OSGi Alliance plan to release a version that can work 
>>>>>> with jdk 7 ?
>>>>>> Or could we build one, as we used to provide the core specs 
>>>>>> before the
>>>>>> alliance put them in maven central ?
>>>>>
>>>>> I think the R5 JARs will target Java 5, once they are released, 
>>>>> which should be fairly soon.
>>>>>
>>>>> -> richard
>>>>>
>>>>
>>
>>


-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
Talend Application Integration Division http://www.talend.com


Re: Java 7 compiler issue

Posted by "Richard S. Hall" <he...@ungoverned.org>.
On 4/27/12 11:06 , Christian Schneider wrote:
> So what is our message to end users?
> Should they not use Java 7 at the moment?

Currently, they have to recompile.

> If the R5 spec comes soon and works that may be acceptable but is not 
> ideal regarding the resons I wrote.

Yes, it is not ideal, but neither is distributing our own independent 
OSGi binaries.

For the Felix framework specfically, I think we will try to roll a 4.2 
release shortly that will switch from target jsr14 to Java 5, which will 
help a little, since the framework JAR embeds the core OSGi API.

In hindsight, it was a mistake for OSGi to use target jsr14 given that 
Java 7 dropped support. Had that been known at the time, a different 
decision would likely have been made, which is why R5 will be different.

-> richard

>
> Christian
>
> Am 27.04.2012 16:10, schrieb Richard S. Hall:
>> On 4/27/12 09:40 , Christian Schneider wrote:
>>> In Karaf we currently include the osgi spec jars in karaf.main which 
>>> is not such a good solution as they are mixed with impl classes.
>>>
>>> So for karaf internally as well as for end users of OSGi developing 
>>> on Java 7 it makes sense to have an OSGi spec that is compatible 
>>> with Java 7 really soon.
>>
>> Just to be clear, the spec is compatible, just the delivered JARs 
>> need to be recompiled.
>>
>>> I will create such a project in
>>> in karaf for the mean time but I would prefer if we could move this 
>>> to Felix. End users would expect such an API jar rather from felix 
>>> then from Karaf.
>>
>> We won't release OSGi artifacts as stand alone. We did that in the 
>> past and it caused us more problems that what it was worth.
>>
>>>
>>> Even with R5 out it might be a good idea to provide a 4.x spec that 
>>> is compatible to Java 7 as developers can use it to express that 
>>> they target their development for an OSGi 4.x framework.
>>> Especially when using the maven bundle plugin this is important as 
>>> it creates the import package version out of the maven artifact 
>>> version.
>>>
>>> So what do you think about providing the OSGi 4.3 specs in Felix?
>>
>> My vote: -1.
>>
>> -> richard
>>
>>>
>>> Christian
>>>
>>> Am 27.04.2012 15:15, schrieb Richard S. Hall:
>>>> On 4/27/12 07:33 , Guillaume Nodet wrote:
>>>>> Does the OSGi Alliance plan to release a version that can work 
>>>>> with jdk 7 ?
>>>>> Or could we build one, as we used to provide the core specs before 
>>>>> the
>>>>> alliance put them in maven central ?
>>>>
>>>> I think the R5 JARs will target Java 5, once they are released, 
>>>> which should be fairly soon.
>>>>
>>>> -> richard
>>>>
>>>
>
>

Re: Java 7 compiler issue

Posted by Christian Schneider <ch...@die-schneider.net>.
So what is our message to end users?
Should they not use Java 7 at the moment?
If the R5 spec comes soon and works that may be acceptable but is not 
ideal regarding the resons I wrote.

Christian

Am 27.04.2012 16:10, schrieb Richard S. Hall:
> On 4/27/12 09:40 , Christian Schneider wrote:
>> In Karaf we currently include the osgi spec jars in karaf.main which 
>> is not such a good solution as they are mixed with impl classes.
>>
>> So for karaf internally as well as for end users of OSGi developing 
>> on Java 7 it makes sense to have an OSGi spec that is compatible with 
>> Java 7 really soon.
>
> Just to be clear, the spec is compatible, just the delivered JARs need 
> to be recompiled.
>
>> I will create such a project in
>> in karaf for the mean time but I would prefer if we could move this 
>> to Felix. End users would expect such an API jar rather from felix 
>> then from Karaf.
>
> We won't release OSGi artifacts as stand alone. We did that in the 
> past and it caused us more problems that what it was worth.
>
>>
>> Even with R5 out it might be a good idea to provide a 4.x spec that 
>> is compatible to Java 7 as developers can use it to express that they 
>> target their development for an OSGi 4.x framework.
>> Especially when using the maven bundle plugin this is important as it 
>> creates the import package version out of the maven artifact version.
>>
>> So what do you think about providing the OSGi 4.3 specs in Felix?
>
> My vote: -1.
>
> -> richard
>
>>
>> Christian
>>
>> Am 27.04.2012 15:15, schrieb Richard S. Hall:
>>> On 4/27/12 07:33 , Guillaume Nodet wrote:
>>>> Does the OSGi Alliance plan to release a version that can work with 
>>>> jdk 7 ?
>>>> Or could we build one, as we used to provide the core specs before the
>>>> alliance put them in maven central ?
>>>
>>> I think the R5 JARs will target Java 5, once they are released, 
>>> which should be fairly soon.
>>>
>>> -> richard
>>>
>>


-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
Talend Application Integration Division http://www.talend.com


Re: Java 7 compiler issue

Posted by "Richard S. Hall" <he...@ungoverned.org>.
On 4/27/12 09:40 , Christian Schneider wrote:
> In Karaf we currently include the osgi spec jars in karaf.main which 
> is not such a good solution as they are mixed with impl classes.
>
> So for karaf internally as well as for end users of OSGi developing on 
> Java 7 it makes sense to have an OSGi spec that is compatible with 
> Java 7 really soon.

Just to be clear, the spec is compatible, just the delivered JARs need 
to be recompiled.

> I will create such a project in
> in karaf for the mean time but I would prefer if we could move this to 
> Felix. End users would expect such an API jar rather from felix then 
> from Karaf.

We won't release OSGi artifacts as stand alone. We did that in the past 
and it caused us more problems that what it was worth.

>
> Even with R5 out it might be a good idea to provide a 4.x spec that is 
> compatible to Java 7 as developers can use it to express that they 
> target their development for an OSGi 4.x framework.
> Especially when using the maven bundle plugin this is important as it 
> creates the import package version out of the maven artifact version.
>
> So what do you think about providing the OSGi 4.3 specs in Felix?

My vote: -1.

-> richard

>
> Christian
>
> Am 27.04.2012 15:15, schrieb Richard S. Hall:
>> On 4/27/12 07:33 , Guillaume Nodet wrote:
>>> Does the OSGi Alliance plan to release a version that can work with 
>>> jdk 7 ?
>>> Or could we build one, as we used to provide the core specs before the
>>> alliance put them in maven central ?
>>
>> I think the R5 JARs will target Java 5, once they are released, which 
>> should be fairly soon.
>>
>> -> richard
>>
>

Re: Java 7 compiler issue

Posted by Christian Schneider <ch...@die-schneider.net>.
In Karaf we currently include the osgi spec jars in karaf.main which is 
not such a good solution as they are mixed with impl classes.

So for karaf internally as well as for end users of OSGi developing on 
Java 7 it makes sense to have an OSGi spec that is compatible with Java 
7 really soon. I will create such a project in
in karaf for the mean time but I would prefer if we could move this to 
Felix. End users would expect such an API jar rather from felix then 
from Karaf.

Even with R5 out it might be a good idea to provide a 4.x spec that is 
compatible to Java 7 as developers can use it to express that they 
target their development for an OSGi 4.x framework.
Especially when using the maven bundle plugin this is important as it 
creates the import package version out of the maven artifact version.

So what do you think about providing the OSGi 4.3 specs in Felix?

Christian

Am 27.04.2012 15:15, schrieb Richard S. Hall:
> On 4/27/12 07:33 , Guillaume Nodet wrote:
>> Does the OSGi Alliance plan to release a version that can work with 
>> jdk 7 ?
>> Or could we build one, as we used to provide the core specs before the
>> alliance put them in maven central ?
>
> I think the R5 JARs will target Java 5, once they are released, which 
> should be fairly soon.
>
> -> richard
>

-- 

Christian Schneider
http://www.liquid-reality.de

Open Source Architect
Talend Application Integration Division http://www.talend.com


Re: Java 7 compiler issue

Posted by "Richard S. Hall" <he...@ungoverned.org>.
On 4/27/12 07:33 , Guillaume Nodet wrote:
> Does the OSGi Alliance plan to release a version that can work with jdk 7 ?
> Or could we build one, as we used to provide the core specs before the
> alliance put them in maven central ?

I think the R5 JARs will target Java 5, once they are released, which 
should be fairly soon.

-> richard

>
> On Mon, Feb 13, 2012 at 15:27, Richard S. Hall<he...@ungoverned.org>  wrote:
>
>> On 2/13/12 01:15 , Christopher BROWN wrote:
>>
>>> Hi,
>>>
>>> Thanks Richard, I'll try that then. I'm guessing I should do that for all
>>> bundles (such as Felix EventAdmin, which I use) to be on the safe side (as
>>> from what I understand of the bug, it only shows up where this leads to
>>> the
>>> JVM getting confused between multiple possible method invocation targets
>>> due to stricter behavior ?
>>>
>> I think only the framework is currently compiled to target jsr14...you
>> only need to recompile stuff that targets jsr14.
>>
>> ->  richard
>>
>>
>>
>>> Thanks,
>>> Christopher
>>>
>>>
>>>
>>> On Monday, 13 February 2012, Richard S. Hall<he...@ungoverned.org>
>>>   wrote:
>>>
>>>> On 2/12/12 15:57 , Christopher BROWN wrote:
>>>>
>>>>> Hello,
>>>>>
>>>>> I followed the different threads on this subject, such as:
>>>>> https://mail.osgi.org/**pipermail/osgi-dev/2011-**August/003224.html<https://mail.osgi.org/pipermail/osgi-dev/2011-August/003224.html>
>>>>> http://www.mail-archive.com/**users@felix.apache.org/**msg11574.html<http://www.mail-archive.com/users@felix.apache.org/msg11574.html>
>>>>>
>>>>> My understanding is that if I target the latest OSGi version and
>>>>> multiple
>>>>> JDK versions, and if I want some (optional) bundles to use JDK7
>>>>> features,
>>>>> then for the JDK7 deployments, I'm also going to have to recompile the
>>>>>
>>>> OSGi
>>>> framework instead of using the binaries for download from Apache (that
>>>>> might be a bit messy if it involves extracting source and rebuilding
>>>>>
>>>> JARs)
>>>> and all bundles that will run on that recompiled framework without the
>>>>> -jsr14 flag (because mixing and matching won't work)?
>>>>>
>>>>> Moreover, trying to understand fully the problem, the problem isn't JDK7
>>>>> specifically, it's the jsr14 flag... If I recompiled Felix *without*
>>>>> this
>>>>> flag, even on JDK5 or JDK6, I *could* mix and match generic-signature
>>>>> methods compiled with pre-JDK7 JDKs (but not JDK1.4 or earlier
>>>>>
>>>> obviously),
>>>> is that right?
>>>>> If my understanding is correct, then could I as of now compile Felix
>>>>> with
>>>>> JDK6 and be sure that the issue with -jsr14 won't occur, and then add
>>>>> one
>>>>> or two JDK7 bundles later if required, without any further
>>>>> recompilation?
>>>>>
>>>> If you compile without the jsr14 flag, I believe everything will work
>>>>
>>> ok...jsr14 is only necessary if you are trying to target older JVMs.
>>>
>>>> Is there any documentation on building Felix 4.x in this way?
>>>> Just modify the target parameter in the framework pom.xml from jsr14 to
>>>>
>>> whichever Java platform you want...
>>>
>>>> ->   richard
>>>>
>>>>   Thanks,
>>>>> Christopher
>>>>>
>>>>>   ------------------------------**------------------------------**
>>>> ---------
>>>> To unsubscribe, e-mail: users-unsubscribe@felix.**apache.org<us...@felix.apache.org>
>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>
>>>>
>>>>
>> ------------------------------**------------------------------**---------
>> To unsubscribe, e-mail: users-unsubscribe@felix.**apache.org<us...@felix.apache.org>
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>

Re: Java 7 compiler issue

Posted by Guillaume Nodet <gn...@gmail.com>.
Does the OSGi Alliance plan to release a version that can work with jdk 7 ?
Or could we build one, as we used to provide the core specs before the
alliance put them in maven central ?

On Mon, Feb 13, 2012 at 15:27, Richard S. Hall <he...@ungoverned.org> wrote:

> On 2/13/12 01:15 , Christopher BROWN wrote:
>
>> Hi,
>>
>> Thanks Richard, I'll try that then. I'm guessing I should do that for all
>> bundles (such as Felix EventAdmin, which I use) to be on the safe side (as
>> from what I understand of the bug, it only shows up where this leads to
>> the
>> JVM getting confused between multiple possible method invocation targets
>> due to stricter behavior ?
>>
>
> I think only the framework is currently compiled to target jsr14...you
> only need to recompile stuff that targets jsr14.
>
> -> richard
>
>
>
>> Thanks,
>> Christopher
>>
>>
>>
>> On Monday, 13 February 2012, Richard S. Hall<he...@ungoverned.org>
>>  wrote:
>>
>>> On 2/12/12 15:57 , Christopher BROWN wrote:
>>>
>>>> Hello,
>>>>
>>>> I followed the different threads on this subject, such as:
>>>> https://mail.osgi.org/**pipermail/osgi-dev/2011-**August/003224.html<https://mail.osgi.org/pipermail/osgi-dev/2011-August/003224.html>
>>>> http://www.mail-archive.com/**users@felix.apache.org/**msg11574.html<http://www.mail-archive.com/users@felix.apache.org/msg11574.html>
>>>>
>>>> My understanding is that if I target the latest OSGi version and
>>>> multiple
>>>> JDK versions, and if I want some (optional) bundles to use JDK7
>>>> features,
>>>> then for the JDK7 deployments, I'm also going to have to recompile the
>>>>
>>> OSGi
>>
>>> framework instead of using the binaries for download from Apache (that
>>>> might be a bit messy if it involves extracting source and rebuilding
>>>>
>>> JARs)
>>
>>> and all bundles that will run on that recompiled framework without the
>>>> -jsr14 flag (because mixing and matching won't work)?
>>>>
>>>> Moreover, trying to understand fully the problem, the problem isn't JDK7
>>>> specifically, it's the jsr14 flag... If I recompiled Felix *without*
>>>> this
>>>> flag, even on JDK5 or JDK6, I *could* mix and match generic-signature
>>>> methods compiled with pre-JDK7 JDKs (but not JDK1.4 or earlier
>>>>
>>> obviously),
>>
>>> is that right?
>>>>
>>>> If my understanding is correct, then could I as of now compile Felix
>>>> with
>>>> JDK6 and be sure that the issue with -jsr14 won't occur, and then add
>>>> one
>>>> or two JDK7 bundles later if required, without any further
>>>> recompilation?
>>>>
>>> If you compile without the jsr14 flag, I believe everything will work
>>>
>> ok...jsr14 is only necessary if you are trying to target older JVMs.
>>
>>> Is there any documentation on building Felix 4.x in this way?
>>>>
>>> Just modify the target parameter in the framework pom.xml from jsr14 to
>>>
>> whichever Java platform you want...
>>
>>> ->  richard
>>>
>>>  Thanks,
>>>> Christopher
>>>>
>>>>  ------------------------------**------------------------------**
>>> ---------
>>> To unsubscribe, e-mail: users-unsubscribe@felix.**apache.org<us...@felix.apache.org>
>>> For additional commands, e-mail: users-help@felix.apache.org
>>>
>>>
>>>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@felix.**apache.org<us...@felix.apache.org>
> For additional commands, e-mail: users-help@felix.apache.org
>
>


-- 
------------------------
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
FuseSource, Integration everywhere
http://fusesource.com

Re: Java 7 compiler issue

Posted by "Richard S. Hall" <he...@ungoverned.org>.
On 2/13/12 01:15 , Christopher BROWN wrote:
> Hi,
>
> Thanks Richard, I'll try that then. I'm guessing I should do that for all
> bundles (such as Felix EventAdmin, which I use) to be on the safe side (as
> from what I understand of the bug, it only shows up where this leads to the
> JVM getting confused between multiple possible method invocation targets
> due to stricter behavior ?

I think only the framework is currently compiled to target jsr14...you 
only need to recompile stuff that targets jsr14.

-> richard

>
> Thanks,
> Christopher
>
>
>
> On Monday, 13 February 2012, Richard S. Hall<he...@ungoverned.org>  wrote:
>> On 2/12/12 15:57 , Christopher BROWN wrote:
>>> Hello,
>>>
>>> I followed the different threads on this subject, such as:
>>> https://mail.osgi.org/pipermail/osgi-dev/2011-August/003224.html
>>> http://www.mail-archive.com/users@felix.apache.org/msg11574.html
>>>
>>> My understanding is that if I target the latest OSGi version and multiple
>>> JDK versions, and if I want some (optional) bundles to use JDK7 features,
>>> then for the JDK7 deployments, I'm also going to have to recompile the
> OSGi
>>> framework instead of using the binaries for download from Apache (that
>>> might be a bit messy if it involves extracting source and rebuilding
> JARs)
>>> and all bundles that will run on that recompiled framework without the
>>> -jsr14 flag (because mixing and matching won't work)?
>>>
>>> Moreover, trying to understand fully the problem, the problem isn't JDK7
>>> specifically, it's the jsr14 flag... If I recompiled Felix *without* this
>>> flag, even on JDK5 or JDK6, I *could* mix and match generic-signature
>>> methods compiled with pre-JDK7 JDKs (but not JDK1.4 or earlier
> obviously),
>>> is that right?
>>>
>>> If my understanding is correct, then could I as of now compile Felix with
>>> JDK6 and be sure that the issue with -jsr14 won't occur, and then add one
>>> or two JDK7 bundles later if required, without any further recompilation?
>> If you compile without the jsr14 flag, I believe everything will work
> ok...jsr14 is only necessary if you are trying to target older JVMs.
>>> Is there any documentation on building Felix 4.x in this way?
>> Just modify the target parameter in the framework pom.xml from jsr14 to
> whichever Java platform you want...
>> ->  richard
>>
>>> Thanks,
>>> Christopher
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Java 7 compiler issue

Posted by Christopher BROWN <br...@reflexe.fr>.
Hi,

Thanks Richard, I'll try that then. I'm guessing I should do that for all
bundles (such as Felix EventAdmin, which I use) to be on the safe side (as
from what I understand of the bug, it only shows up where this leads to the
JVM getting confused between multiple possible method invocation targets
due to stricter behavior ?

Thanks,
Christopher



On Monday, 13 February 2012, Richard S. Hall <he...@ungoverned.org> wrote:
> On 2/12/12 15:57 , Christopher BROWN wrote:
>>
>> Hello,
>>
>> I followed the different threads on this subject, such as:
>> https://mail.osgi.org/pipermail/osgi-dev/2011-August/003224.html
>> http://www.mail-archive.com/users@felix.apache.org/msg11574.html
>>
>> My understanding is that if I target the latest OSGi version and multiple
>> JDK versions, and if I want some (optional) bundles to use JDK7 features,
>> then for the JDK7 deployments, I'm also going to have to recompile the
OSGi
>> framework instead of using the binaries for download from Apache (that
>> might be a bit messy if it involves extracting source and rebuilding
JARs)
>> and all bundles that will run on that recompiled framework without the
>> -jsr14 flag (because mixing and matching won't work)?
>>
>> Moreover, trying to understand fully the problem, the problem isn't JDK7
>> specifically, it's the jsr14 flag... If I recompiled Felix *without* this
>> flag, even on JDK5 or JDK6, I *could* mix and match generic-signature
>> methods compiled with pre-JDK7 JDKs (but not JDK1.4 or earlier
obviously),
>> is that right?
>>
>> If my understanding is correct, then could I as of now compile Felix with
>> JDK6 and be sure that the issue with -jsr14 won't occur, and then add one
>> or two JDK7 bundles later if required, without any further recompilation?
>
> If you compile without the jsr14 flag, I believe everything will work
ok...jsr14 is only necessary if you are trying to target older JVMs.
>
>>
>> Is there any documentation on building Felix 4.x in this way?
>
> Just modify the target parameter in the framework pom.xml from jsr14 to
whichever Java platform you want...
>
> -> richard
>
>>
>> Thanks,
>> Christopher
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

-- 
Cordialement,
Christopher BROWN
REFLEXE Technologies

Re: Java 7 compiler issue

Posted by "Richard S. Hall" <he...@ungoverned.org>.
On 2/12/12 15:57 , Christopher BROWN wrote:
> Hello,
>
> I followed the different threads on this subject, such as:
> https://mail.osgi.org/pipermail/osgi-dev/2011-August/003224.html
> http://www.mail-archive.com/users@felix.apache.org/msg11574.html
>
> My understanding is that if I target the latest OSGi version and multiple
> JDK versions, and if I want some (optional) bundles to use JDK7 features,
> then for the JDK7 deployments, I'm also going to have to recompile the OSGi
> framework instead of using the binaries for download from Apache (that
> might be a bit messy if it involves extracting source and rebuilding JARs)
> and all bundles that will run on that recompiled framework without the
> -jsr14 flag (because mixing and matching won't work)?
>
> Moreover, trying to understand fully the problem, the problem isn't JDK7
> specifically, it's the jsr14 flag... If I recompiled Felix *without* this
> flag, even on JDK5 or JDK6, I *could* mix and match generic-signature
> methods compiled with pre-JDK7 JDKs (but not JDK1.4 or earlier obviously),
> is that right?
>
> If my understanding is correct, then could I as of now compile Felix with
> JDK6 and be sure that the issue with -jsr14 won't occur, and then add one
> or two JDK7 bundles later if required, without any further recompilation?

If you compile without the jsr14 flag, I believe everything will work 
ok...jsr14 is only necessary if you are trying to target older JVMs.

>
> Is there any documentation on building Felix 4.x in this way?

Just modify the target parameter in the framework pom.xml from jsr14 to 
whichever Java platform you want...

-> richard

>
> Thanks,
> Christopher
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org