
The most effective way to import all missing packages at once:
- Open Eclipse
- Open class where imports should be
- Press:
CTRL + SHIFT + O
Sample:
- Get code from previous example: “Java: Simple Way to Write XML (DOM) File in Java“
- Remove all imported packages
- Press:
CTRL + SHIFT + O
and you should see below dialog boxes - Choose your desired import package and
click next
- It will prompt you for your next import and thats it
- You are done


I hope above simple steps will help you import all missing imports without even using mouse with simple command.
Thank you very much, Ctrl + Shift + O, works great . greatly appreciate your work
I’m using Eclipse 2019 and this doesn’t appear to work with static imports. Specifically the Collectors.toList(). I had .collect(toList()) and couldn’t get it to create the static import.
Hi Kari – can you share a screenshot from your Eclipse?
Are you getting any error? Above steps should work as it is 🙂