I have imported a few external library imports in a java file. After saving the file eclipse auto removes these imports.

Quick googling showed me results about organizing imports. But these are disabled in eclipse work-space.

How should I prevent this behavior?

2 Answers

0
Community On

If you convert your project into a Maven project, you can add your imports into the pom.xml file.
Thus all your external exports would now be considered as internal ones.
If you don't want to convert your project to Maven, you could Add External libraries to Eclispe. See here

1
Aditya Gupta On

It was in fact inside Save Actions.

Although the Perform the selected actions on save was unchecked, these settings were enabled inside Configure Project Specific Settings and the corresponding project.