This page summarizes the work that is being done to add Java™ 8 support into Eclipse. As of now JSR 335 (Lambda expressions) and JSR 308 (Type annotations) are being planned
Java 8 features that are being worked on
- JSR 335 [Lambda expressions] + [Default Methods]
- JSR 308 [Type annotations]
- Repeating annotations/Meta data enhancement specification [Add support for JEP118(Runtime access to parameter names) and JEP120 (Repeating annotations)]
What needs to be done
- TO BE FILLED
Updates are filed in the top level bug [380190 - Add support for Java SE 8]
JDT UI changes are tracked in JDT UI/Java8
|Lambda Expressions||Method references||Default Methods||Type Annotations / Receiver parameter|
|Grammar / Parser||(1)||(1)||(1)||(1)|
|Compiler||in progress||in progress||(1)||(1)|
|Java Model (Jay)||under investigation||under investigation||under investigation||no changes needed atm|
|DOM / AST||(1)||in progress||in progress||(1)|
|AST Rewrite||in progress||in progress||in progress||(1)|
|Class file generation||April (Srikanth)||April (Srikanth)||(1)||in progress (Markus)|
|Code select (Anirban)||in progress||in progress||in progress||in progress|
|Code completion (Anirban)||in progress||in progress||in progress||in progress|
||Not done yet|
(1) more work needed if spec changes
- The following lines must be added in all headers of modified files for Java™ 8 implementation:
* This is an implementation of an early-draft specification developed under the Java * Community Process (JCP) and is made available for testing and evaluation purposes * only. The code is not compatible with any specification of the JCP. *
- Use the following @since tag on all newly added members: "3.9 BETA_JAVA8"
What to do to set up the IDE
- Checkout the BETA_JAVA8 branch of the following git repositories:
- JDT/Core repository - git://git.eclipse.org/gitroot/jdt/eclipse.jdt.core.git
- You need to install a JDK8 build as an installed JRE in order to run the tests using the JavaSE-1.8 Execution Environment.
- For more information on how to work with git repositories, look at http://wiki.eclipse.org/Platform-releng/Git_Workflows .
Configure a project to use Java 8 features
Because JDT/UI does not yet offer the options to configure a project for Java 8, any projects wishing to use Java 8 features should be manually configured by ensuring these lines in
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 org.eclipse.jdt.core.compiler.compliance=1.8 org.eclipse.jdt.core.compiler.source=1.8
This is a work in progress. The contents of the BETA_JAVA8 branch will be updated as the changes are made to the JSR Specification.