简体   繁体   中英

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. (eg, 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.

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.* .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM