Java

 Home

Code to find the path of Jar file which contains particular class:

ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
URL fileURL = classLoader.getResource("org/jdom/input/DOMBuilder.class");
System.out.println( fileURL );
      

IBM softwares