Eclipse autocompletion for jdk.* packages does not work

I write here because I noticed a strange behaviour of Eclipse IDE (2022-12).

Basically, the autocompletition does not work properly when I use a class from a jdk.* package.

For example:

import jdk.jshell.*;
public class Test {
private static final JShell JSHELL = JShell.create();
...
...
public static void main(String[] args) {} 

} 

Now when I write JSHELL. (e.g., inside the main method), I get only proposal for the methods of the Object class. No specific proposal is available.

What am I doing wrong?

Thanks.

Tried updating & reinstalling Eclipse.

Upvotes: 0

Views: 103

Answers (1)

howlger
howlger

Reputation: 34155

jdk.* is filtered by default.

When you want to use something of jdk.* in a project, go to the preferences Java > Appearance > Type Filters and uncheck the item jdk.*.

Upvotes: 1

Related Questions