This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Features new in Java 8 and the fly likes lambdas and Java 7 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Features new in Java 8
Bookmark "lambdas and Java 7" Watch "lambdas and Java 7" New topic
Author

lambdas and Java 7

Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

Hi author,

I haven't yet downloaded Java 8 JDK but I was wondering if java 8 compiler can compile code having lambdas targetting java 7 JVM.

Thanks,
Pradeep


Groovy
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9398
    
    2

The answer is no and yes. No it does not work out of the box, yes with a tool like Retrolambda (https://github.com/orfjackal/retrolambda) you can port it to Java 7.


SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

Awesome. Thanks Joe.
 
GeeCON Prague 2014
 
subject: lambdas and Java 7