Since closures are one of the main features of latest Java release I tried to try some examples in Eclipse (java 1.7/java 1.8ea with Eclipse 4.2). But surprisingly it seems Eclipse does not support closures right now? All I get is a bunch of error messages whenever it finds anything related to closures in the sourcecode. The maximum "Compiler Compliance Level" I can set is 7. Does anyone know how to do this?
Asked
Active
Viewed 250 times
1
-
2possible duplicate of [Eclipse 4.2 and Java 8](http://stackoverflow.com/questions/10454470/eclipse-4-2-and-java-8) – verdesmarald Sep 29 '12 at 10:22
-
According to that question the answer is "You can't, yet." Although this is a developing area so that may have changed since May 4 I suppose. – verdesmarald Sep 29 '12 at 10:27
1 Answers
1
Eclipse uses its own compiler (see What is the difference between javac and the Eclipse compiler?) and so does not provide support for future (potentially unstable) versions of Java. So there's no way to force this. Your only option is to use Eclipse as editor and compile using the JDK8 javac.
To do this, go to Project and add a new Builder specifying where the javac is and the other options.