Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "JDT Core/Java8"

(What to do to set up the IDE)
 
(45 intermediate revisions by 7 users not shown)
Line 1: Line 1:
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 support for Eclipse is ready, see [[JDT/Eclipse Java 8 Support For Kepler]]'''. This page summarizes the work that was done.
  
= Java 8 features that are being worked on =
+
= Eclipse Support for Java 8 - Release Schedule =
* JSR 335 [[https://bugs.eclipse.org/bugs/show_bug.cgi?id=380188 Lambda expressions]] + [[https://bugs.eclipse.org/bugs/show_bug.cgi?id=380501 Default Methods]]
+
* JSR 308 [[https://bugs.eclipse.org/bugs/show_bug.cgi?id=380501 Type annotations]]
+
* Meta data enhancement specification [[https://bugs.eclipse.org/bugs/show_bug.cgi?id=406966 JEP118: Runtime access to parameter names]] + [[https://bugs.eclipse.org/bugs/show_bug.cgi?id=407864 JEP120: Repeating annotations]]
+
  
<br>
+
* Feb 21st 2014: Early Access Release IV: '''Release candidate 1'''
 +
** What is new in this release ?
 +
*** JDT/Core and JDT/APT are already feature complete - This is a bug fix release with numerous defects resolved
  
= What needs to be done =
+
* March 7th 2014 : '''Release candidate 2'''
* TO BE FILLED
+
** Bug fixes
  
<br>
+
* March 18th 2014: '''General availability release''' ('''Available''' - See below for install instructions)
= Current status<br>  =
+
  
Updates are filed in the top level bug [[https://bugs.eclipse.org/bugs/show_bug.cgi?id=380190 380190 - Add support for Java SE 8]]
+
= Installation instructions =
  
JDT UI changes are tracked in [[JDT UI/Java8]]
+
Starting with I20140318-0830 all our Luna (4.4) builds contain the Eclipse support for Java™ 8. For Kepler SR2 (4.3.2) a feature patch is available. For details go to our [http://download.eclipse.org/eclipse/downloads/ downloads page].
 +
 
 +
= Java 8 features ready to be tested (save for some very minor defects) =
 +
* JSR 308 - Type Annotations
 +
* Default & static methods in interfaces
 +
* Support for lambda expressions and method/constructor references is substantially in place except in the areas of type inference, lambda serialization and varargs.
 +
* Support for Java 8 type inference specification.
 +
* Quick assist support for migrating anonymous classes to lambda expressions and vice versa.
 +
* Meta data enhancement specification:
 +
** JEP120: Repeating annotations
 +
** JEP118: Runtime access to parameter names
 +
* JSR269 Enhancements for Pluggable Annotation Processor API and javax.lang.model APIs
 +
* Formatter, code completion, code navigation, search & indexing, reconciler, incremental builder support for all of Java 8
 +
* Basic IDE enablement for all of Java 8
 +
* AST/APIs for all of Java 8
 +
* Serializable lambda support
 +
* JSR308 type annotations based null analysis (substantially complete - some open issues exist)
 +
* UI: Basic infrastructure like the Java-related views, Java Compiler compliance settings, Organize Imports, Mark Occurrences, Open Declaration (F3), Edit > Expand Selection To > ...,  Content Assist (Ctrl+Space), Formatting, and Source Actions should work correctly in most situations when you start using them with Java 8 constructs.
  
 
<br>
 
<br>
  
{| cellspacing="0" cellpadding="5" border="1" align="center"
+
= How to report defects ? =
|+ '''Java 8 features'''
+
|-
+
! width="200" align="center" style="background: none repeat scroll 0% 0%" |
+
! width="200" align="center" style="background: none repeat scroll 0% 0%" | Lambda Expressions
+
! width="200" align="center" style="background: none repeat scroll 0% 0%" | Method references
+
! width="200" align="center" style="background: none repeat scroll 0% 0%" | Default Methods
+
! width="200" align="center" style="background: none repeat scroll 0% 0%" | Type Annotations / Receiver parameter
+
|-
+
! width="200" align="center" style="background: none repeat scroll 0% 0%" | Grammar / Parser
+
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(206, 242, 206);" | (1)
+
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(206, 242, 206);" | (1)
+
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(206, 242, 206);" | (1)
+
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(206, 242, 206);" | (1)
+
|-
+
! width="200" align="center" style="background: none repeat scroll 0% 0%" | Compiler
+
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | in progress
+
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | in progress
+
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(206, 242, 206);" | (1)
+
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(206, 242, 206);" | (1)
+
|-
+
! width="200" align="center" style="background: none repeat scroll 0% 0%" | Reconciler
+
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(206, 242, 206);" | (1)
+
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(206, 242, 206);" | (1)
+
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(206, 242, 206);" | (1)
+
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(206, 242, 206);" | (1)
+
|-
+
! width="200" align="center" style="background: none repeat scroll 0% 0%" | Error recovery
+
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" |
+
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" |
+
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" |
+
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" |
+
|-
+
! width="200" align="center" style="background: none repeat scroll 0% 0%" | Java Model (Jay)
+
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | under investigation
+
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | under investigation
+
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | under investigation
+
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(206, 242, 206);" | no changes needed atm
+
|-
+
! width="200" align="center" style="background: none repeat scroll 0% 0%" | DOM / AST
+
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(206, 242, 206);" | (1)
+
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | in progress
+
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | in progress
+
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(206, 242, 206);" | (1)
+
|-
+
! width="200" align="center" style="background: none repeat scroll 0% 0%" | AST Rewrite
+
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | in progress
+
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | in progress
+
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | in progress
+
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(206, 242, 206);" | (1)
+
|-
+
! width="200" align="center" style="background: none repeat scroll 0% 0%" | Class file generation
+
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | April (Srikanth)
+
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | April (Srikanth)
+
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(206, 242, 206);" | (1)
+
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | in progress (Markus)
+
|-
+
! width="200" align="center" style="background: none repeat scroll 0% 0%" | Formatter
+
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(206, 242, 206);" | (1)
+
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(206, 242, 206);" | (1)
+
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(206, 242, 206);" | (1)
+
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(206, 242, 206);" | (1)
+
|-
+
! width="200" align="center" style="background: none repeat scroll 0% 0%" | Indexer (Manoj)
+
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | April-May
+
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | April-May
+
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | April-May
+
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | April-May
+
|-
+
! width="200" align="center" style="background: none repeat scroll 0% 0%" | Search (manoj)
+
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | April-May
+
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | April-May
+
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | April-May
+
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | April-May
+
|-
+
! width="200" align="center" style="background: none repeat scroll 0% 0%" | Code select (Anirban)
+
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | in progress
+
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | in progress
+
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | in progress
+
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | in progress
+
|-
+
! width="200" align="center" style="background: none repeat scroll 0% 0%" | Code completion (Anirban)
+
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | in progress
+
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | in progress
+
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | in progress
+
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | in progress
+
|}
+
<br>
+
  
{| cellspacing="0" cellpadding="5" border="1" style="width: 300px; height: 25px;"
+
File defect reports [[https://bugs.eclipse.org/bugs/enter_bug.cgi?product=JDT here]].
|-
+
<br>
! style="background: none repeat scroll 0% 0% rgb(206, 242, 206);" | &nbsp;&nbsp;
+
Open work items can be perused [[https://bugs.eclipse.org/bugs/buglist.cgi?list_id=7107554&classification=Eclipse&query_format=advanced&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&component=APT&component=Core&product=JDT&target_milestone=BETA%20J8 here]].
| Done
+
|-
+
! style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | <br>
+
| Not done yet
+
|}
+
(1) more work needed if spec changes
+
  
 
= IMPORTANT NOTE =
 
= IMPORTANT NOTE =
Line 131: Line 53:
  
 
= What to do to set up the IDE  =
 
= What to do to set up the IDE  =
 +
 +
*You need to install a JDK 8 build as an installed JRE in order to compile org.eclipse.jdt.annotation and run the tests using the JavaSE-1.8 Execution Environment.
 +
** Use the exact name "JavaSE-1.8" for the JRE
  
 
*Checkout the BETA_JAVA8 branch of the following git repositories:
 
*Checkout the BETA_JAVA8 branch of the following git repositories:
 
**JDT Core repository - git://git.eclipse.org/gitroot/jdt/eclipse.jdt.core.git
 
**JDT Core repository - git://git.eclipse.org/gitroot/jdt/eclipse.jdt.core.git
 
**JDT UI repository - git://git.eclipse.org/gitroot/jdt/eclipse.jdt.ui.git
 
**JDT UI repository - git://git.eclipse.org/gitroot/jdt/eclipse.jdt.ui.git
 
+
**JDT Debug repository - git://git.eclipse.org/gitroot/jdt/eclipse.jdt.debug.git
*You need to install a JDK 8 build as an installed JRE in order to run the tests using the JavaSE-1.8 Execution Environment.
+
**Equinox OSGi repository: git://git.eclipse.org/gitroot/equinox/rt.equinox.framework.git
 +
**For tests:
 +
***Releng repository - git://git.eclipse.org/gitroot/platform/eclipse.platform.releng.git
 +
***Text repository - git://git.eclipse.org/gitroot/platform/eclipse.platform.text.git
  
 
*For more information on how to work with git repositories, look at http://wiki.eclipse.org/Platform-releng/Git_Workflows .
 
*For more information on how to work with git repositories, look at http://wiki.eclipse.org/Platform-releng/Git_Workflows .
  
*As [[Version_Numbering#API_Baseline_in_API_Tools|API Baseline]], use 3.8 (or [http://download.eclipse.org/eclipse/downloads/drops/S-3.8RC4-201206081200/ 3.8 RC4] until 3.8 is released).
+
*Set R4.3.1 as Target Platform.
 +
*Set R4.3.1 as [[Version_Numbering#API_Baseline_in_API_Tools|API Baseline]].
  
 +
* If you are going to be running Ant builds (stand-alone or as project builders) using the 1.8 javac target, you should read the following wiki: [[Ant/Java8 | Ant / Java 8]].
 
<br>
 
<br>
 
= 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 <code><project>/.settings/org.eclipse.jdt.core.prefs</code>:
 
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
 
  
 
= Disclaimer  =
 
= Disclaimer  =
  
 
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.  
 
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.  
 
+
Please use the early access builds only in a test/evaluation mode and not in the real development environment.
 
If you need any help with this, please contact the JDT/Core team through either the [http://www.eclipse.org/forums/index.php/f/13/ forum] or [https://bugs.eclipse.org/bugs/enter_bug.cgi?product=JDT Bugzilla].
 
If you need any help with this, please contact the JDT/Core team through either the [http://www.eclipse.org/forums/index.php/f/13/ forum] or [https://bugs.eclipse.org/bugs/enter_bug.cgi?product=JDT Bugzilla].
  
 
[[Category:JDT]]
 
[[Category:JDT]]

Latest revision as of 00:10, 10 February 2016

Java™ 8 support for Eclipse is ready, see JDT/Eclipse Java 8 Support For Kepler. This page summarizes the work that was done.

Eclipse Support for Java 8 - Release Schedule

  • Feb 21st 2014: Early Access Release IV: Release candidate 1
    • What is new in this release ?
      • JDT/Core and JDT/APT are already feature complete - This is a bug fix release with numerous defects resolved
  • March 7th 2014 : Release candidate 2
    • Bug fixes
  • March 18th 2014: General availability release (Available - See below for install instructions)

Installation instructions

Starting with I20140318-0830 all our Luna (4.4) builds contain the Eclipse support for Java™ 8. For Kepler SR2 (4.3.2) a feature patch is available. For details go to our downloads page.

Java 8 features ready to be tested (save for some very minor defects)

  • JSR 308 - Type Annotations
  • Default & static methods in interfaces
  • Support for lambda expressions and method/constructor references is substantially in place except in the areas of type inference, lambda serialization and varargs.
  • Support for Java 8 type inference specification.
  • Quick assist support for migrating anonymous classes to lambda expressions and vice versa.
  • Meta data enhancement specification:
    • JEP120: Repeating annotations
    • JEP118: Runtime access to parameter names
  • JSR269 Enhancements for Pluggable Annotation Processor API and javax.lang.model APIs
  • Formatter, code completion, code navigation, search & indexing, reconciler, incremental builder support for all of Java 8
  • Basic IDE enablement for all of Java 8
  • AST/APIs for all of Java 8
  • Serializable lambda support
  • JSR308 type annotations based null analysis (substantially complete - some open issues exist)
  • UI: Basic infrastructure like the Java-related views, Java Compiler compliance settings, Organize Imports, Mark Occurrences, Open Declaration (F3), Edit > Expand Selection To > ..., Content Assist (Ctrl+Space), Formatting, and Source Actions should work correctly in most situations when you start using them with Java 8 constructs.


How to report defects ?

File defect reports [here].
Open work items can be perused [here].

IMPORTANT NOTE

  • 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

  • You need to install a JDK 8 build as an installed JRE in order to compile org.eclipse.jdt.annotation and run the tests using the JavaSE-1.8 Execution Environment.
    • Use the exact name "JavaSE-1.8" for the JRE
  • If you are going to be running Ant builds (stand-alone or as project builders) using the 1.8 javac target, you should read the following wiki: Ant / Java 8.


Disclaimer

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. Please use the early access builds only in a test/evaluation mode and not in the real development environment. If you need any help with this, please contact the JDT/Core team through either the forum or Bugzilla.

Back to the top