Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Java Introduction to Functional Programming Java's Functional Toolset Using forEach

Trevor Braxton-Barto
PLUS
Trevor Braxton-Barto
Courses Plus Student 1,258 Points

Error in Dr.Java

File: C:\Users\Trevor\Desktop\School\TeamTreehouse\Functional Java\lcc-java-fp-printer-1.0.3\src\main\java\com\teamtreehouse\challenges\Printer.java [line: 23] Error: Lambda expressions are allowed only at source level 1.8 or above

I have the most updated version of Java, and my compiler, Dr.Java, states that they support Java 6, 7, and 8. The challenge is simple, and I've been using Lambda expressions/operations for a while on a challenge question site which uses an online compiler, so I'm sure there isn't anything wrong with my code.

1 Answer

Craig Dennis
STAFF
Craig Dennis
Treehouse Teacher

I found this: http://www.drjava.org/docs/user/ch06s03.html

This error is suggesting that you need to set your compiler to Java 8 (or 1.8). I do recommend you use IntelliJ, but this should work.

Trevor Braxton-Barto
Trevor Braxton-Barto
Courses Plus Student 1,258 Points

Thanks Craig!

Actually miles ahead here: watching you use IntelliJ in such a swift and succinct way persuaded me to get it yesterday!