Eclipse JDT, Java 8, lambdas

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Eclipse JDT, Java 8, lambdas

Nam-Luc Tran
Hello,

I am trying to use Java 8 lambdas in my project and hit the following
error:

Exception in thread "main"
org.apache.flink.api.common.functions.InvalidTypesException: The
generic type parameters of 'Tuple2' are missing. 
It seems that your compiler has not stored them into the .class
file. 
Currently, only the Eclipse JDT compiler preserves the type
information necessary to use the lambdas feature type-safely. 
See the documentation for more information about how to compile jobs
containing lambda expressions.
at
org.apache.flink.api.java.typeutils.TypeExtractor.validateLambdaGenericParameter(TypeExtractor.java:779)
at
org.apache.flink.api.java.typeutils.TypeExtractor.validateLambdaGenericParameters(TypeExtractor.java:765)
at
org.apache.flink.api.java.typeutils.TypeExtractor.getUnaryOperatorReturnType(TypeExtractor.java:135)
at
org.apache.flink.api.java.typeutils.TypeExtractor.getMapReturnTypes(TypeExtractor.java:78)
at org.apache.flink.api.java.DataSet.map(DataSet.java:160)
at eu.euranova.flink.Axa.main(Axa.java:62)

My very simple code is the following:

File directory = new File(
"PATH TO A DIRECTORY WITH CSV FILES");
DataSet set = env.fromElements(new Tuple3(0, 0.0, 0.0));
for (File file : directory.listFiles()) {
int pathID = 0;
String filePath = "file://" + file.getAbsolutePath();
DataSet set2 =
env.readCsvFile(filePath).ignoreFirstLine().includeFields("11").types(Double.class,Double.class);
DataSet set3 = set2.map(tuple -> new Tuple3(pathID, tuple.f0,
tuple.f1));
set = set.union(set3);
}

I followed the steps in the Java 8 documentation section
(http://flink.apache.org/docs/0.8/java8_programming_guide.html#compiler-limitations)
and have applied the following to the pom.xml file created using the
flink archetype:
- Modified java 1.6 reference to 1.8
- Uncommented the section related to Java 8 lambdas
- Installed Eclipse Java developer tools (JDT)
- Installed m2e-jdt connector

The pom.xml does not show any error and builds fine.

Am I missing something? Do I need to explicity set up Eclipse JDT? The
only installed environment shown in my preferences is the
/usr/java/jdk-1.8.0_31 from oracle. 

Thanks and best regards,

Tran Nam-Luc
Reply | Threaded
Open this post in threaded view
|

Re: Eclipse JDT, Java 8, lambdas

Robert Metzger
Hi,

looking at your code, it seems that you are creating a DataSet for each
file in the "directory". Flink can also read entire directories.

Now regarding the actual problem:
How are you starting the Flink job?
Out of your IDE, or using the "./bin/flink run" tool?


Best,
Robert


On Fri, Feb 6, 2015 at 12:27 PM, Nam-Luc Tran <[hidden email]>
wrote:

> Hello,
>
> I am trying to use Java 8 lambdas in my project and hit the following
> error:
>
> Exception in thread "main"
> org.apache.flink.api.common.functions.InvalidTypesException: The
> generic type parameters of 'Tuple2' are missing.
> It seems that your compiler has not stored them into the .class
> file.
> Currently, only the Eclipse JDT compiler preserves the type
> information necessary to use the lambdas feature type-safely.
> See the documentation for more information about how to compile jobs
> containing lambda expressions.
> at
>
> org.apache.flink.api.java.typeutils.TypeExtractor.validateLambdaGenericParameter(TypeExtractor.java:779)
> at
>
> org.apache.flink.api.java.typeutils.TypeExtractor.validateLambdaGenericParameters(TypeExtractor.java:765)
> at
>
> org.apache.flink.api.java.typeutils.TypeExtractor.getUnaryOperatorReturnType(TypeExtractor.java:135)
> at
>
> org.apache.flink.api.java.typeutils.TypeExtractor.getMapReturnTypes(TypeExtractor.java:78)
> at org.apache.flink.api.java.DataSet.map(DataSet.java:160)
> at eu.euranova.flink.Axa.main(Axa.java:62)
>
> My very simple code is the following:
>
> File directory = new File(
> "PATH TO A DIRECTORY WITH CSV FILES");
> DataSet set = env.fromElements(new Tuple3(0, 0.0, 0.0));
> for (File file : directory.listFiles()) {
> int pathID = 0;
> String filePath = "file://" + file.getAbsolutePath();
> DataSet set2 =
>
> env.readCsvFile(filePath).ignoreFirstLine().includeFields("11").types(Double.class,Double.class);
> DataSet set3 = set2.map(tuple -> new Tuple3(pathID, tuple.f0,
> tuple.f1));
> set = set.union(set3);
> }
>
> I followed the steps in the Java 8 documentation section
> (
> http://flink.apache.org/docs/0.8/java8_programming_guide.html#compiler-limitations
> )
> and have applied the following to the pom.xml file created using the
> flink archetype:
> - Modified java 1.6 reference to 1.8
> - Uncommented the section related to Java 8 lambdas
> - Installed Eclipse Java developer tools (JDT)
> - Installed m2e-jdt connector
>
> The pom.xml does not show any error and builds fine.
>
> Am I missing something? Do I need to explicity set up Eclipse JDT? The
> only installed environment shown in my preferences is the
> /usr/java/jdk-1.8.0_31 from oracle.
>
> Thanks and best regards,
>
> Tran Nam-Luc
>
Reply | Threaded
Open this post in threaded view
|

Re: Eclipse JDT, Java 8, lambdas

Stephan Ewen
In reply to this post by Nam-Luc Tran
Hi Tran Nam-Luc!

Java 8 lambdas are a bit tricky right now, because of Java's generic type
erasure. Flink needs the type information of all Functions before sending
programs to the execution engine.
(for more details, see here:
https://github.com/apache/flink/blob/master/docs/internal_types_serialization.md
)

The type analysis is part of how we make program execution very robust,
even on really large data. By not just passing Java Objects and using
ad-hoc serialization frameworks, but
by understanding the types up front and parameterizing the runtime
accordingly, we get efficiency and reliability in the execution. We can
also do a better job in finding errors before the parallel execution.

The JDT compiler accidentally dropped generic types on lambdas a while
back, but we submitted a patch to reintroduce them (see [1]) and it will be
part of the next major Eclipse release.

Until then, to use Java 8 lambdas you need to follow these points:

 - If the function returns a simple type (like int, long, String) or any
non-generic class, it should work out of the box.
 - If the function returns a generic type (like tuple), you need to use a
type hint to tell the system the return type. Below is an example for that.

DataSet<Long> data = ...
DataSet<Tuple2<Long, Double>> = data.map( value -> new Tuple2<>(value,
value * 0.5) ).returns("Tuple2<Long,Double>");

The type hints are a workaround that will be obsolete once Java compiler
support is available.

Greetings,
Stephan


[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=449063




On Fri, Feb 6, 2015 at 12:27 PM, Nam-Luc Tran <[hidden email]>
wrote:

> Hello,
>
> I am trying to use Java 8 lambdas in my project and hit the following
> error:
>
> Exception in thread "main"
> org.apache.flink.api.common.functions.InvalidTypesException: The
> generic type parameters of 'Tuple2' are missing.
> It seems that your compiler has not stored them into the .class
> file.
> Currently, only the Eclipse JDT compiler preserves the type
> information necessary to use the lambdas feature type-safely.
> See the documentation for more information about how to compile jobs
> containing lambda expressions.
> at
>
> org.apache.flink.api.java.typeutils.TypeExtractor.validateLambdaGenericParameter(TypeExtractor.java:779)
> at
>
> org.apache.flink.api.java.typeutils.TypeExtractor.validateLambdaGenericParameters(TypeExtractor.java:765)
> at
>
> org.apache.flink.api.java.typeutils.TypeExtractor.getUnaryOperatorReturnType(TypeExtractor.java:135)
> at
>
> org.apache.flink.api.java.typeutils.TypeExtractor.getMapReturnTypes(TypeExtractor.java:78)
> at org.apache.flink.api.java.DataSet.map(DataSet.java:160)
> at eu.euranova.flink.Axa.main(Axa.java:62)
>
> My very simple code is the following:
>
> File directory = new File(
> "PATH TO A DIRECTORY WITH CSV FILES");
> DataSet set = env.fromElements(new Tuple3(0, 0.0, 0.0));
> for (File file : directory.listFiles()) {
> int pathID = 0;
> String filePath = "file://" + file.getAbsolutePath();
> DataSet set2 =
>
> env.readCsvFile(filePath).ignoreFirstLine().includeFields("11").types(Double.class,Double.class);
> DataSet set3 = set2.map(tuple -> new Tuple3(pathID, tuple.f0,
> tuple.f1));
> set = set.union(set3);
> }
>
> I followed the steps in the Java 8 documentation section
> (
> http://flink.apache.org/docs/0.8/java8_programming_guide.html#compiler-limitations
> )
> and have applied the following to the pom.xml file created using the
> flink archetype:
> - Modified java 1.6 reference to 1.8
> - Uncommented the section related to Java 8 lambdas
> - Installed Eclipse Java developer tools (JDT)
> - Installed m2e-jdt connector
>
> The pom.xml does not show any error and builds fine.
>
> Am I missing something? Do I need to explicity set up Eclipse JDT? The
> only installed environment shown in my preferences is the
> /usr/java/jdk-1.8.0_31 from oracle.
>
> Thanks and best regards,
>
> Tran Nam-Luc
>
Reply | Threaded
Open this post in threaded view
|

Re: Eclipse JDT, Java 8, lambdas

Stephan Ewen
Hey!

I just saw that the fix was ported to the Eclipse 4.5 M4 release, which can
be downloaded here: https://www.eclipse.org/downloads/index-developer.php

I am eager to try that out for myself later. If the fix is really included,
this Eclipse version should support lambdas elegantly out of the box.

Greetings,
Stephan



On Fri, Feb 6, 2015 at 2:09 PM, Stephan Ewen <[hidden email]> wrote:

> Hi Tran Nam-Luc!
>
> Java 8 lambdas are a bit tricky right now, because of Java's generic type
> erasure. Flink needs the type information of all Functions before sending
> programs to the execution engine.
> (for more details, see here:
> https://github.com/apache/flink/blob/master/docs/internal_types_serialization.md
> )
>
> The type analysis is part of how we make program execution very robust,
> even on really large data. By not just passing Java Objects and using
> ad-hoc serialization frameworks, but
> by understanding the types up front and parameterizing the runtime
> accordingly, we get efficiency and reliability in the execution. We can
> also do a better job in finding errors before the parallel execution.
>
> The JDT compiler accidentally dropped generic types on lambdas a while
> back, but we submitted a patch to reintroduce them (see [1]) and it will be
> part of the next major Eclipse release.
>
> Until then, to use Java 8 lambdas you need to follow these points:
>
>  - If the function returns a simple type (like int, long, String) or any
> non-generic class, it should work out of the box.
>  - If the function returns a generic type (like tuple), you need to use a
> type hint to tell the system the return type. Below is an example for that.
>
> DataSet<Long> data = ...
> DataSet<Tuple2<Long, Double>> = data.map( value -> new Tuple2<>(value,
> value * 0.5) ).returns("Tuple2<Long,Double>");
>
> The type hints are a workaround that will be obsolete once Java compiler
> support is available.
>
> Greetings,
> Stephan
>
>
> [1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=449063
>
>
>
>
> On Fri, Feb 6, 2015 at 12:27 PM, Nam-Luc Tran <[hidden email]>
> wrote:
>
>> Hello,
>>
>> I am trying to use Java 8 lambdas in my project and hit the following
>> error:
>>
>> Exception in thread "main"
>> org.apache.flink.api.common.functions.InvalidTypesException: The
>> generic type parameters of 'Tuple2' are missing.
>> It seems that your compiler has not stored them into the .class
>> file.
>> Currently, only the Eclipse JDT compiler preserves the type
>> information necessary to use the lambdas feature type-safely.
>> See the documentation for more information about how to compile jobs
>> containing lambda expressions.
>> at
>>
>> org.apache.flink.api.java.typeutils.TypeExtractor.validateLambdaGenericParameter(TypeExtractor.java:779)
>> at
>>
>> org.apache.flink.api.java.typeutils.TypeExtractor.validateLambdaGenericParameters(TypeExtractor.java:765)
>> at
>>
>> org.apache.flink.api.java.typeutils.TypeExtractor.getUnaryOperatorReturnType(TypeExtractor.java:135)
>> at
>>
>> org.apache.flink.api.java.typeutils.TypeExtractor.getMapReturnTypes(TypeExtractor.java:78)
>> at org.apache.flink.api.java.DataSet.map(DataSet.java:160)
>> at eu.euranova.flink.Axa.main(Axa.java:62)
>>
>> My very simple code is the following:
>>
>> File directory = new File(
>> "PATH TO A DIRECTORY WITH CSV FILES");
>> DataSet set = env.fromElements(new Tuple3(0, 0.0, 0.0));
>> for (File file : directory.listFiles()) {
>> int pathID = 0;
>> String filePath = "file://" + file.getAbsolutePath();
>> DataSet set2 =
>>
>> env.readCsvFile(filePath).ignoreFirstLine().includeFields("11").types(Double.class,Double.class);
>> DataSet set3 = set2.map(tuple -> new Tuple3(pathID, tuple.f0,
>> tuple.f1));
>> set = set.union(set3);
>> }
>>
>> I followed the steps in the Java 8 documentation section
>> (
>> http://flink.apache.org/docs/0.8/java8_programming_guide.html#compiler-limitations
>> )
>> and have applied the following to the pom.xml file created using the
>> flink archetype:
>> - Modified java 1.6 reference to 1.8
>> - Uncommented the section related to Java 8 lambdas
>> - Installed Eclipse Java developer tools (JDT)
>> - Installed m2e-jdt connector
>>
>> The pom.xml does not show any error and builds fine.
>>
>> Am I missing something? Do I need to explicity set up Eclipse JDT? The
>> only installed environment shown in my preferences is the
>> /usr/java/jdk-1.8.0_31 from oracle.
>>
>> Thanks and best regards,
>>
>> Tran Nam-Luc
>>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Eclipse JDT, Java 8, lambdas

Nam-Luc Tran
Thank you for your replies.

@Stephen
Updating to 0.9-SNAPSHOT and using the "return" statement did the trick. I will try the 4.5 M4 release and give a feedback on how it went.

@Robert
I launch the job right from the Eclipse IDE.
Also, each file in the folder contains data for a different trajectory. By iterating this way I create a different dataset for each trajectory and add a tag for identifying data of a same trajectory. I then union all these datasets together in a same dataset. Do you see a more streamlined way to achieve this?

Best regards,

Tran Nam-Luc
Reply | Threaded
Open this post in threaded view
|

Re: Eclipse JDT, Java 8, lambdas

Robert Metzger
Sorry, I didn't see the pathID which is added in the map() method.
Then your approach looks good for using Flink locally.

On Fri, Feb 6, 2015 at 3:03 PM, Nam-Luc Tran <[hidden email]>
wrote:

> Thank you for your replies.
>
> @Stephen
> Updating to 0.9-SNAPSHOT and using the "return" statement did the trick. I
> will try the 4.5 M4 release and give a feedback on how it went.
>
> @Robert
> I launch the job right from the Eclipse IDE.
> Also, each file in the folder contains data for a different trajectory. By
> iterating this way I create a different dataset for each trajectory and add
> a tag for identifying data of a same trajectory. I then union all these
> datasets together in a same dataset. Do you see a more streamlined way to
> achieve this?
>
> Best regards,
>
> Tran Nam-Luc
>
>
>
>
> --
> View this message in context:
> http://apache-flink-incubator-mailing-list-archive.1008284.n3.nabble.com/Eclipse-JDT-Java-8-lambdas-tp3664p3675.html
> Sent from the Apache Flink (Incubator) Mailing List archive. mailing list
> archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|

Re: Eclipse JDT, Java 8, lambdas

Nam-Luc Tran
I did try the 4.5 M4 release and it did not go straightforward.
Reply | Threaded
Open this post in threaded view
|

Re: Eclipse JDT, Java 8, lambdas

Timo Walther-2
Hey,

it seems that 4.4.2 also includes the fix
(https://projects.eclipse.org/projects/eclipse/releases/4.4.2/bugs) and
will be released end of february. I will try Eclipse Luna SR2 RC2 today
and check if it is working.

Regards,
Timo


On 09.02.2015 10:05, Nam-Luc Tran wrote:
> I did try the 4.5 M4 release and it did not go straightforward.
>
>
>
> --
> View this message in context: http://apache-flink-incubator-mailing-list-archive.1008284.n3.nabble.com/Eclipse-JDT-Java-8-lambdas-tp3664p3688.html
> Sent from the Apache Flink (Incubator) Mailing List archive. mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|

Re: Eclipse JDT, Java 8, lambdas

Timo Walther-2
The fix is included in 4.4.2. However, it seems that even if the
compiler option
"org.eclipse.jdt.core.compiler.codegen.lambda.genericSignature=generate"
is set in the project's "org.eclipse.jdt.core.prefs" file, it has no effect.

The command line approach works:

java -jar ./plugins/org.eclipse.jdt.core_3.10.2.v20150120-1634.jar "-8"
"-cp" "/usr/lib/jvm/jdk1.8.0/jre/lib/rt.jar" "-genericsignature" "Test.java"

I will further investigate the problem and open an issue at Eclipse JDT.


Regards
Timo


On 09.02.2015 10:39, Timo Walther wrote:

> Hey,
>
> it seems that 4.4.2 also includes the fix
> (https://projects.eclipse.org/projects/eclipse/releases/4.4.2/bugs)
> and will be released end of february. I will try Eclipse Luna SR2 RC2
> today and check if it is working.
>
> Regards,
> Timo
>
>
> On 09.02.2015 10:05, Nam-Luc Tran wrote:
>> I did try the 4.5 M4 release and it did not go straightforward.
>>
>>
>>
>> --
>> View this message in context:
>> http://apache-flink-incubator-mailing-list-archive.1008284.n3.nabble.com/Eclipse-JDT-Java-8-lambdas-tp3664p3688.html
>> Sent from the Apache Flink (Incubator) Mailing List archive. mailing
>> list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|

Re: Eclipse JDT, Java 8, lambdas

Stephan Ewen
Is it possible to use this compiler for the java 8 quickstart archetypes?

On Mon, Feb 9, 2015 at 4:14 PM, Timo Walther <[hidden email]> wrote:

> The fix is included in 4.4.2. However, it seems that even if the compiler
> option "org.eclipse.jdt.core.compiler.codegen.lambda.genericSignature=generate"
> is set in the project's "org.eclipse.jdt.core.prefs" file, it has no effect.
>
> The command line approach works:
>
> java -jar ./plugins/org.eclipse.jdt.core_3.10.2.v20150120-1634.jar "-8"
> "-cp" "/usr/lib/jvm/jdk1.8.0/jre/lib/rt.jar" "-genericsignature"
> "Test.java"
>
> I will further investigate the problem and open an issue at Eclipse JDT.
>
>
> Regards
> Timo
>
>
>
> On 09.02.2015 10:39, Timo Walther wrote:
>
>> Hey,
>>
>> it seems that 4.4.2 also includes the fix (https://projects.eclipse.org/
>> projects/eclipse/releases/4.4.2/bugs) and will be released end of
>> february. I will try Eclipse Luna SR2 RC2 today and check if it is working.
>>
>> Regards,
>> Timo
>>
>>
>> On 09.02.2015 10:05, Nam-Luc Tran wrote:
>>
>>> I did try the 4.5 M4 release and it did not go straightforward.
>>>
>>>
>>>
>>> --
>>> View this message in context: http://apache-flink-incubator-
>>> mailing-list-archive.1008284.n3.nabble.com/Eclipse-JDT-
>>> Java-8-lambdas-tp3664p3688.html
>>> Sent from the Apache Flink (Incubator) Mailing List archive. mailing
>>> list archive at Nabble.com.
>>>
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: Eclipse JDT, Java 8, lambdas

Timo Walther-2
I will investigate that until the compiler is officially released (not
just an RC).

I think we should change the documentation to the current situation of
Lambda Expressions where only a specific minor release version of
Eclipse JDT compiler is officially supported. I will do this tomorrow...

On 09.02.2015 16:28, Stephan Ewen wrote:

> Is it possible to use this compiler for the java 8 quickstart archetypes?
>
> On Mon, Feb 9, 2015 at 4:14 PM, Timo Walther <[hidden email]> wrote:
>
>> The fix is included in 4.4.2. However, it seems that even if the compiler
>> option "org.eclipse.jdt.core.compiler.codegen.lambda.genericSignature=generate"
>> is set in the project's "org.eclipse.jdt.core.prefs" file, it has no effect.
>>
>> The command line approach works:
>>
>> java -jar ./plugins/org.eclipse.jdt.core_3.10.2.v20150120-1634.jar "-8"
>> "-cp" "/usr/lib/jvm/jdk1.8.0/jre/lib/rt.jar" "-genericsignature"
>> "Test.java"
>>
>> I will further investigate the problem and open an issue at Eclipse JDT.
>>
>>
>> Regards
>> Timo
>>
>>
>>
>> On 09.02.2015 10:39, Timo Walther wrote:
>>
>>> Hey,
>>>
>>> it seems that 4.4.2 also includes the fix (https://projects.eclipse.org/
>>> projects/eclipse/releases/4.4.2/bugs) and will be released end of
>>> february. I will try Eclipse Luna SR2 RC2 today and check if it is working.
>>>
>>> Regards,
>>> Timo
>>>
>>>
>>> On 09.02.2015 10:05, Nam-Luc Tran wrote:
>>>
>>>> I did try the 4.5 M4 release and it did not go straightforward.
>>>>
>>>>
>>>>
>>>> --
>>>> View this message in context: http://apache-flink-incubator-
>>>> mailing-list-archive.1008284.n3.nabble.com/Eclipse-JDT-
>>>> Java-8-lambdas-tp3664p3688.html
>>>> Sent from the Apache Flink (Incubator) Mailing List archive. mailing
>>>> list archive at Nabble.com.
>>>>

Reply | Threaded
Open this post in threaded view
|

Re: Eclipse JDT, Java 8, lambdas

Stephan Ewen
We still need to figure out a way to actually activate the lambda support
in Eclipse. I have not managed to do that so far ;-)

On Wed, Feb 11, 2015 at 9:41 PM, Timo Walther <[hidden email]> wrote:

> I will investigate that until the compiler is officially released (not
> just an RC).
>
> I think we should change the documentation to the current situation of
> Lambda Expressions where only a specific minor release version of Eclipse
> JDT compiler is officially supported. I will do this tomorrow...
>
>
> On 09.02.2015 16:28, Stephan Ewen wrote:
>
>> Is it possible to use this compiler for the java 8 quickstart archetypes?
>>
>> On Mon, Feb 9, 2015 at 4:14 PM, Timo Walther <[hidden email]> wrote:
>>
>>  The fix is included in 4.4.2. However, it seems that even if the compiler
>>> option "org.eclipse.jdt.core.compiler.codegen.lambda.
>>> genericSignature=generate"
>>> is set in the project's "org.eclipse.jdt.core.prefs" file, it has no
>>> effect.
>>>
>>> The command line approach works:
>>>
>>> java -jar ./plugins/org.eclipse.jdt.core_3.10.2.v20150120-1634.jar "-8"
>>> "-cp" "/usr/lib/jvm/jdk1.8.0/jre/lib/rt.jar" "-genericsignature"
>>> "Test.java"
>>>
>>> I will further investigate the problem and open an issue at Eclipse JDT.
>>>
>>>
>>> Regards
>>> Timo
>>>
>>>
>>>
>>> On 09.02.2015 10:39, Timo Walther wrote:
>>>
>>>  Hey,
>>>>
>>>> it seems that 4.4.2 also includes the fix (
>>>> https://projects.eclipse.org/
>>>> projects/eclipse/releases/4.4.2/bugs) and will be released end of
>>>> february. I will try Eclipse Luna SR2 RC2 today and check if it is
>>>> working.
>>>>
>>>> Regards,
>>>> Timo
>>>>
>>>>
>>>> On 09.02.2015 10:05, Nam-Luc Tran wrote:
>>>>
>>>>  I did try the 4.5 M4 release and it did not go straightforward.
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> View this message in context: http://apache-flink-incubator-
>>>>> mailing-list-archive.1008284.n3.nabble.com/Eclipse-JDT-
>>>>> Java-8-lambdas-tp3664p3688.html
>>>>> Sent from the Apache Flink (Incubator) Mailing List archive. mailing
>>>>> list archive at Nabble.com.
>>>>>
>>>>>
>
Reply | Threaded
Open this post in threaded view
|

Re: Eclipse JDT, Java 8, lambdas

Timo Walther-2
Yes sure, we need to figure that out. I investigated 2 hours in that
issue, but I couldn't find a reason. At the moment, I think it seems
that the IDE does not read its configuration files correctly.
Unfortunately, I have not much time resources this week. But I will try
to solve that problem.


On 11.02.2015 21:43, Stephan Ewen wrote:

> We still need to figure out a way to actually activate the lambda support
> in Eclipse. I have not managed to do that so far ;-)
>
> On Wed, Feb 11, 2015 at 9:41 PM, Timo Walther <[hidden email]> wrote:
>
>> I will investigate that until the compiler is officially released (not
>> just an RC).
>>
>> I think we should change the documentation to the current situation of
>> Lambda Expressions where only a specific minor release version of Eclipse
>> JDT compiler is officially supported. I will do this tomorrow...
>>
>>
>> On 09.02.2015 16:28, Stephan Ewen wrote:
>>
>>> Is it possible to use this compiler for the java 8 quickstart archetypes?
>>>
>>> On Mon, Feb 9, 2015 at 4:14 PM, Timo Walther <[hidden email]> wrote:
>>>
>>>   The fix is included in 4.4.2. However, it seems that even if the compiler
>>>> option "org.eclipse.jdt.core.compiler.codegen.lambda.
>>>> genericSignature=generate"
>>>> is set in the project's "org.eclipse.jdt.core.prefs" file, it has no
>>>> effect.
>>>>
>>>> The command line approach works:
>>>>
>>>> java -jar ./plugins/org.eclipse.jdt.core_3.10.2.v20150120-1634.jar "-8"
>>>> "-cp" "/usr/lib/jvm/jdk1.8.0/jre/lib/rt.jar" "-genericsignature"
>>>> "Test.java"
>>>>
>>>> I will further investigate the problem and open an issue at Eclipse JDT.
>>>>
>>>>
>>>> Regards
>>>> Timo
>>>>
>>>>
>>>>
>>>> On 09.02.2015 10:39, Timo Walther wrote:
>>>>
>>>>   Hey,
>>>>> it seems that 4.4.2 also includes the fix (
>>>>> https://projects.eclipse.org/
>>>>> projects/eclipse/releases/4.4.2/bugs) and will be released end of
>>>>> february. I will try Eclipse Luna SR2 RC2 today and check if it is
>>>>> working.
>>>>>
>>>>> Regards,
>>>>> Timo
>>>>>
>>>>>
>>>>> On 09.02.2015 10:05, Nam-Luc Tran wrote:
>>>>>
>>>>>   I did try the 4.5 M4 release and it did not go straightforward.
>>>>>>
>>>>>>
>>>>>> --
>>>>>> View this message in context: http://apache-flink-incubator-
>>>>>> mailing-list-archive.1008284.n3.nabble.com/Eclipse-JDT-
>>>>>> Java-8-lambdas-tp3664p3688.html
>>>>>> Sent from the Apache Flink (Incubator) Mailing List archive. mailing
>>>>>> list archive at Nabble.com.
>>>>>>
>>>>>>