Over a million developers have joined DZone.

Use Lambda Expressions Without Java 8

· Java Zone

Check out this 8-step guide to see how you can increase your productivity by skipping slow application redeploys and by implementing application profiling, as you code! Brought to you in partnership with ZeroTurnaround.

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.

The Java Zone is brought to you in partnership with ZeroTurnaround. Check out this 8-step guide to see how you can increase your productivity by skipping slow application redeploys and by implementing application profiling, as you code!

Topics:

Published at DZone with permission of James Sugrue, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

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

{{ parent.tldr }}

{{ parent.urlSource.name }}