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.