Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Use Lambda Expressions Without Java 8

DZone's Guide to

Use Lambda Expressions Without Java 8

· Java Zone ·
Free Resource

Download Microservices for Java Developers: A hands-on introduction to frameworks and containers. Brought to you in partnership with Red Hat.

One of the things that makes developers excited about Java 8 is the ability to use lambda expressions in their code. But what if you are using an earlier version of Java? Esko Luontola has the answer for you!  

After asking if anything existed that backported lambda expressions to Java 7, and getting no answers, he just went ahead an built Retolambda  himself.  The project works as follows: 

 will take bytecode compiled with Java 8 and convert it to run on Java 7, 6 and 5 runtimes, letting you use  lambda expressions and  method references on those platforms.


What I love about this story is how, on seeing there was no library available for what he needed, Esko built it himself; no complaining about how it didn't exist, just code and build. True innovation and drive.

Download Building Reactive Microservices in Java: Asynchronous and Event-Based Application Design. Brought to you in partnership with Red Hat

Topics:

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}