0

I have used following code to print the classpath from inside of jar (build with intelliJ):

    URL[] urls = ((URLClassLoader) ClassLoader.getSystemClassLoader()).getURLs();
    for (URL url : urls) {
        System.out.println(url);
    }

However this throws NullPointerException. What am I doing wrong?

Andy Turner
  • 131,952
  • 11
  • 151
  • 228
heky__
  • 65
  • 2
  • 6

0 Answers0