6

Hi today I installed java 17 and eclipse(with latest version- 2021‑09). But after all configuration it is showing JavaSE-16 as jdk version. I ignored it and started writing a program with sealed classes. Then it is showing an error. I managed to solve the problem by installing the Java-17 support plugin from eclipse marketplace. Is it possible in eclipse without installing anything.

user16436946
  • 89
  • 1
  • 1
  • 10
  • 1 vote for having the same problem. –  Sep 20 '21 at 03:07
  • 3
    No, it isn't possible without installing anything - Java 17 support is in the patch. Eclipse 2021-12 will have full Java 17 support included. – greg-449 Sep 20 '21 at 06:33
  • 3
    Generally, don't expect tooling support for something a day after it has been released. – howlger Sep 20 '21 at 06:43
  • 1
    Does this answer your question? [Eclipse 2021-09 code completion not showing all methods and classes](https://stackoverflow.com/questions/69357171/eclipse-2021-09-code-completion-not-showing-all-methods-and-classes) – Arsh Coder Oct 21 '21 at 05:25

3 Answers3

6

The release notes state this:

Supports Java 17, including Pattern Matching for Switch (Preview), Sealed Classes, and more via Eclipse Marketplace

That means currently you have to install the plugin, later support will be included. You might also want to read this: https://www.eclipse.org/eclipse/news/4.21/jdt.php

Marged
  • 10,577
  • 10
  • 57
  • 99
2

Install java 17 plugin from this link. Then your likely to have a content assist error. Fix it by this answer.

Arsh Coder
  • 688
  • 9
  • 33
0

The support should be official with Eclipse 4.22 (Q4 2021)

Java 17

Java 17 is out and Eclipse JDT supports Java 17 in 4.22.

The release notably includes the following Java 17 features:

  • JEP 306: Restore Always-Strict Floating-Point Semantics.
  • JEP 406: Pattern Matching for switch (Preview).
  • JEP 409: Sealed Classes (Final).

Please note that preview option should be on for preview language features. >For an informal introduction of the support, please refer to J**ava 17 Examples wiki**.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250