How to know the classes my Java project uses?

0

I would like to know if there is any way to see which classes are used in my java project, since I use some libraries of extensive classes and want to see which of their classes are the ones that I really use, to eliminate the others and that the project is so big. Greetings and thanks in advance.

    
asked by ScorpJr 06.12.2017 в 20:35
source

1 answer

1

If you are using Eclipse, press CONTROL + SHIFT + O and all the imports are reorganized.

For example, if you have the following import:

import java.util.*;

You're importing all the java.util classes, and maybe you're just using a two or three. Pressing CONTROL + SHIFT + O in Eclipse will reorganize, delete the ones you are not using, and change the asterisks for the classes you really need.

import java.util.Date;
import java.util.Scanner;

I do not know if it's exactly the answer you were looking for, but if it is and you're using another IDE, maybe it's another combination of keys.

    
answered by 06.12.2017 в 20:54