还在为NOSuchMethodException困扰么,无意中发现一利器:
The best way to identify the offending earlier jar file is with a few lines of java. These will load one of the core POI classes, and report where it came from.
ClassLoader classloader = org.apache.poi.poifs.filesystem.POIFSFileSystem.class.getClassLoader(); URL res = classloader.getResource("org/apache/poi/poifs/filesystem/POIFSFileSystem.class"> String path = res.getPath(); System.out.println("Core POI came from " + path);