I am using some third party code which when given a \'-classpath\' command line argument doesnt set the java.class.path, but instead just creates a classloader, adds all the
In case other answers don't work, try this:
ClassLoader cl = ClassLoader.getSystemClassLoader(); URL[] urls = ((URLClassLoader) cl).getURLs(); for (URL url: urls) { System.out.println(url.getFile()); }