我试图运行一个软件, 如果一个实体是地理上的或不是地理上的, 我可以用这个软件去破坏:
public boolean isgeo(String e) throws Exception{
ToponymSearchCriteria searchCriteria = new ToponymSearchCriteria();
searchCriteria.setNameEquals(e);
ToponymSearchResult searchResult = WebService.search(searchCriteria);
entity = (ArrayList) searchResult.getToponyms();
for (Toponym toponym : searchResult.getToponyms()) {
System.out.println(toponym.getName()+" "+ toponym.getCountryName());
}
if(entity.size()>0)
return true;
else
return false;
}
但当我调用这个函数时,我有这些例外:
Exception in thread "main" java.lang.NoClassDefFoundError: org/jdom/input/SAXBuilder
at org.geonames.WebService.connectAndParse(Unknown Source)
at org.geonames.WebService.search(Unknown Source)
at geonames.utility.isgeo(utility.java:35)
at geonames.main.main(main.java:31)
Caused by: java.lang.ClassNotFoundException: org.jdom.input.SAXBuilder
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
有人能帮我吗?