How to configure organizing of Java imports in Netbeans

formatting, import, java, netbeans

Solution

Try:

- Click Tools → Options.

- Click the Editor icon.

- Click the Formatting tab.

- Set Language to: `Java`.

- Set Category to: `Imports`.

- Change the settings as desired.

- Click OK or Apply to save the changes.

To organize the imports on save:

- Click Tools → Options.

- Click the Editor icon.

- Click the On Save tab.

- Check Remove Unused Imports.

- Check Organize Imports.

- Click OK or Apply to save the changes.

Problem

Currently Netbeans (I'm using version 7.3.1) has an in-built ability to organize imports in Java files via menu Source » Organize Imports. But I need to change the default order of imports. (For example, when working in a shared environment, software developers must use the same import settings.) Is there any way to do so?

Original source