Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse not recognising Java-17

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.

like image 804
user16436946 Avatar asked Sep 20 '21 03:09

user16436946


1 Answers

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

like image 145
Marged Avatar answered Oct 14 '22 12:10

Marged