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
Here is a code snippet you can put into your main method in Java to output paths to all dependencies of your application:
ClassLoader cl = ClassLoader.getSystemClassLoader(); URL[] urls = ((URLClassLoader) cl).getURLs(); for(URL url: urls){ System.out.println(url.getPath()); }