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.
CodePudding user response:
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.*
.