Javac backend for Eclipse JDT

Add this URL to your Eclipse Installation to reach this solution's update site.

2024-12 (4.34), 2025-03 (4.35)

https://ci.eclipse.org/ls/job/jdt-core-incubator/job/dom-with-javac/lastSuccessfulBuild/artifact/repository/target/repository/

Learn more...
Solution Description

This fragment contains a Javac backend (instead of ECJ) for JDT features:

  • error reporting/reconciling
  • build/compilation
  • indexing
  • code selection (Ctrl + click / hover)
  • code completion (requires JDT fork bundle + opt-out flag)
  • search/match (requires JDT fork bundle + opt-out flag)

Why?

Some background...

  • These days, with more frequent and more features Java releases, it's becoming hard for JDT to cope with new Java features on time and facilitate support for upcoming/preview features before Java is released so JDT can participate to consolidation of the spec. Over recent releases, JDT has failed at providing the features on time. This is mostly because of the difficulty of maintaining the Eclipse compiler: compilers are difficult bits of code to maintain and it takes a lot of time to implement things well in them. There is no clear sign the situation can improve here.
  • The Eclipse compiler has always suffered from occasional inconsistencies with Javac which end-users fail at understanding. Sometimes, ECJ is right, sometimes Javac is; but for end-users and for the ecosystem, Javac is the reference implementation and it's behavior is what they perceive as the actual specification
  • JDT has a very strong ecosystem (JDT-LS, plugins) a tons of nice features, so it seems profitable to keep relying higher-level JDT APIs, such as model or DOM to remain compatible with the ecosystem

The technical proposal here mostly to allow Javac to be used at the lowest-level of JDT, under the hood, to populate higher-level models that are used in many operations; named the JDT DOM and IJavaElement models. It is expected that if we can create a good DOM and IJavaElement structure with another strategy (eg using Javac API), then all higher level operations will remain working as well without modification.

Additional Details

Eclipse Versions: 2024-12 (4.34), 2025-03 (4.35)

Platform Support: Windows, Mac, Linux/GTK

Organization Name: Red Hat and Microsoft

Development Status: Alpha

Date Created: Wednesday, December 11, 2024 - 11:25

License: EPL

Date Updated: Tuesday, December 17, 2024 - 11:21

Submitted by: Mickael Istria

Date Ranking Installs Clickthroughs
February 2025 413/569 4 10
January 2025 355/654 18 23
December 2024 499/654 6 22
November 2024 0/0 0 0
October 2024 0/0 0 0
September 2024 0/0 0 0
August 2024 0/0 0 0
July 2024 0/0 0 0
June 2024 0/0 0 0
May 2024 0/0 0 0
April 2024 0/0 0 0
March 2024 0/0 0 0
View Data for all Listings

Unsuccessful Installs

Unsuccessful Installs in the last 7 Days: 0

Download last 500 errors (CSV)

Marketplace Drag to Install Button

By adding the following code below to your website you will be able to add an install button for Javac backend for Eclipse JDT.

HTML Code:

Markdown Syntax:

Output:

Drag to your running Eclipse* workspace. *Requires Eclipse Marketplace Client