还在为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);

本文介绍了一种确定引发NOSuchMethodException错误的jar文件的方法。通过几行Java代码定位到问题根源,加载核心POI类并报告其来源路径。
536

被折叠的 条评论
为什么被折叠?



