我下载了OWL API(4.0.1和4.0.2)。但是它需要大量的依赖,而这些依赖性是无处可提的。我从maven pom.xml文件下载了依赖JAR(在OWL API 4.0.1版本的某个地方找到它)。罐子清单:
首先,它是RDFFormat的错误(需要添加sesame lib,它不在pom.xml中。 但我仍然有" NoSuchMethodError "错误。 第一个是
com.google.common.base.Objects.firstNonNull
(使用Guava 17.0)。我将其更新为18.0,现在是
com.google.common.base.Platform.systemNanoTime
这里有关于stackoverflow的答案:
你最有可能同时拥有最新版本的番石榴 谷歌收集或类路径3.0之前的番石榴版本
但不,我没有名为google-collect(离子)的古老的Guava lib。
答案 0 :(得分:3)
Maven依赖项是可传递的。如果您因某些原因不想使用Maven,则需要包含所有这些内容。这是owlapi 4.0.2的依赖树。
[INFO] \- net.sourceforge.owlapi:owlapi-distribution:jar:4.0.2:compile
[INFO] +- org.openrdf.sesame:sesame-model:jar:2.7.12:compile
[INFO] | \- org.openrdf.sesame:sesame-util:jar:2.7.12:compile
[INFO] +- org.openrdf.sesame:sesame-rio-api:jar:2.7.12:compile
[INFO] +- org.openrdf.sesame:sesame-rio-languages:jar:2.7.12:compile
[INFO] +- org.openrdf.sesame:sesame-rio-datatypes:jar:2.7.12:compile
[INFO] +- org.openrdf.sesame:sesame-rio-binary:jar:2.7.12:compile
[INFO] +- org.openrdf.sesame:sesame-rio-n3:jar:2.7.12:compile
[INFO] +- org.openrdf.sesame:sesame-rio-nquads:jar:2.7.12:compile
[INFO] | \- commons-io:commons-io:jar:2.4:compile
[INFO] +- org.openrdf.sesame:sesame-rio-ntriples:jar:2.7.12:compile
[INFO] +- org.openrdf.sesame:sesame-rio-rdfjson:jar:2.7.12:compile
[INFO] | \- com.fasterxml.jackson.core:jackson-core:jar:2.2.1:compile
[INFO] +- org.openrdf.sesame:sesame-rio-rdfxml:jar:2.7.12:compile
[INFO] +- org.openrdf.sesame:sesame-rio-trix:jar:2.7.12:compile
[INFO] +- org.openrdf.sesame:sesame-rio-turtle:jar:2.7.12:compile
[INFO] +- org.openrdf.sesame:sesame-rio-trig:jar:2.7.12:compile
[INFO] +- com.github.jsonld-java:jsonld-java-sesame:jar:0.5.0:compile
[INFO] | \- com.github.jsonld-java:jsonld-java:jar:0.5.0:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-databind:jar:2.3.3:compile
[INFO] | | \- com.fasterxml.jackson.core:jackson-annotations:jar:2.3.0:compile
[INFO] | +- org.apache.httpcomponents:httpclient-cache:jar:4.2.5:compile
[INFO] | +- org.apache.httpcomponents:httpclient:jar:4.2.5:compile
[INFO] | | +- org.apache.httpcomponents:httpcore:jar:4.2.4:compile
[INFO] | | \- commons-codec:commons-codec:jar:1.6:compile
[INFO] | \- org.slf4j:jcl-over-slf4j:jar:1.7.7:runtime
[INFO] +- org.semarglproject:semargl-sesame:jar:0.6.1:compile
[INFO] | +- org.semarglproject:semargl-core:jar:0.6.1:compile
[INFO] | \- org.semarglproject:semargl-rdfa:jar:0.6.1:compile
[INFO] | \- org.semarglproject:semargl-rdf:jar:0.6.1:compile
[INFO] +- com.google.guava:guava:jar:18.0:compile
[INFO] +- com.google.inject:guice:jar:4.0-beta:compile
[INFO] | +- javax.inject:javax.inject:jar:1:compile
[INFO] | \- aopalliance:aopalliance:jar:1.0:compile
[INFO] +- com.google.inject.extensions:guice-multibindings:jar:4.0-beta:compile
[INFO] +- com.google.code.findbugs:jsr305:jar:2.0.1:compile
[INFO] +- org.slf4j:slf4j-api:jar:1.7.7:compile
[INFO] +- org.apache.directory.studio:org.apache.commons.io:jar:2.4:compile
[INFO] \- net.sf.trove4j:trove4j:jar:3.0.3:compile
在大多数情况下,使用Maven(或其他一些现代构建工具)可以更轻松地生活。它处理这样的依赖性问题,所以你不必这样做。如果您因某种原因而被蚂蚁困住,您还可以查看ivy。
答案 1 :(得分:0)
感谢您的回复。我用
-verbose:class
并发现,该类的包来自
gephi-toolkit.jar
Tt也有谷歌收藏......所以是的,不同的版本。