Anton Krosnev
Anton Krosnev

Reputation: 4132

Eclipse 4.6 code completion does not work with Java 9

Eclipse is Version:

Neon Release (4.6.0) Build id: 20160613-1800

with

"Eclipse JDT (Java Development Tools) Patch with Java 9 support (BETA) for Neon development stream" version 1.1.1.v20160606-0010_BETA_JAVA9 (Java 9 plugin).

running on

Java(TM) SE Runtime Environment (build 9-ea+122) Java HotSpot(TM) 64-Bit Server VM (build 9-ea+122, mixed mode)

Code completion does not work with Java 9, although it works fine with Java 8. The problem seems to be that the JDK does not have rt.jar. However when I type the code it is not marked as broken (no red underscoring), also JDK modules and packages are displayed in Package Explorer view.


 Package Explorer view


If someone has an idea how I can I overcome this, I would be very thankful.

Upvotes: 2

Views: 513

Answers (1)

howlger
howlger

Reputation: 34295

Java 9 Early Access is a moving target and breaks Eclipse Java 9 support (BETA) and/or Eclipse Code Recommenders from time to time (e.g. Eclipse bug 494481).

Check if you can see the Java 9 modules, packages and classes in the Package or Project Explorer view?

If yes:

  • Use JDK's content assist instead of Code Recommenders: Window > Preferences: Java > Editor > Content Assist > Advanced check Java Proposals instead of Java Proposals (Code Recommenders)

If no:

  • Wait for an update of Eclipse Java 9 support (BETA) or
  • downgrade Java 9: Build 108 works for me; because it is not possible to install an older version, you have to uninstall the newer version first

Upvotes: 2

Related Questions