Skip to content

Commit 04c3628

Browse files
author
Graham Allan
committed
Add a file which will: check that the development environment is setup, since its the only initial place to use jdk8 features; give hints on where to get a lambda build, ide, etc.
1 parent 83ddcb9 commit 04c3628

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package org.adoptajsr.lambda.tutorial.setupcheck;
2+
3+
import java.util.List;
4+
import static java.util.Arrays.asList;
5+
6+
public class ConfigureYourLambdaBuildOfJdk {
7+
8+
public static void main(String... args) {
9+
List<String> messages = asList(
10+
"If this source file does not compile, you have not configured your development setup correctly.",
11+
"It uses both a new JDK 8 syntax (method references with '::') and a new JDK 8 library method (Iterable#forEach)",
12+
"You should also be able to execute this main method, and see this message printed to the console.",
13+
"",
14+
"To configure your development environment, you need:",
15+
" - a lambda build of JDK 8, available at: http://jdk8.java.net/lambda/",
16+
" - a lambda-aware IDE.",
17+
" IntelliJ and NetBeans support lambdas in early access versions, available at: http://openjdk.java.net/projects/lambda/ \n" +
18+
" Eclipse support is more sketchy, the method described here just about works: http://tuhrig.de/?p=921",
19+
" Maven will compile your code and run your tests, just, add JDK 8 javac and java executables to your system path and use 'mvn test'",
20+
"",
21+
"Until this source file compiles, you will be unable to make progress in the tutorial.");
22+
23+
messages.forEach(System.out::println);
24+
}
25+
}

0 commit comments

Comments
 (0)