The most effective way to import all missing packages at once:
- Open Eclipse
- Open class where imports should be
CTRL + SHIFT + O
- 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.