How do I get a list of Java class dependencies for a main class?

前端 未结 5 1255
孤城傲影
孤城傲影 2020-12-16 20:06

Is there a way to find all the class dependencies of a java main class?

I have been manually sifting through the imports of the main class and it\'s imports but then

5条回答
  •  遥遥无期
    2020-12-16 20:32

    It can be eaily done with just javac. Delete your class files and then compile the main class. javac will recursively compile any classes it needs (providing you don't hide package private classes/interfaces in strangely named files). Of course, this doesn't cover any recursive hacks.

提交回复
热议问题