我正在尝试使用耶拿。为了创建一个新的本体,我的代码是:
String SOURCE = "http://www.w3.org/2002/07/owl#";
String NS = SOURCE + "#";
OntModel ontology = ModelFactory.createOntologyModel();
ontology.read( SOURCE, "OWL/XML" );
但它给了我这个错误:
Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
at com.hp.hpl.jena.util.Metadata.<clinit>(Metadata.java:26)
at com.hp.hpl.jena.JenaRuntime.<clinit>(JenaRuntime.java:25)
at com.hp.hpl.jena.rdf.model.impl.RDFReaderFImpl.<clinit>(RDFReaderFImpl.java:85)
at com.hp.hpl.jena.rdf.model.impl.ModelCom.<clinit>(ModelCom.java:42)
at com.hp.hpl.jena.rdf.model.ModelFactory.createDefaultModel(ModelFactory.java:122)
at com.hp.hpl.jena.rdf.model.ModelFactory.createDefaultModel(ModelFactory.java:116)
at com.hp.hpl.jena.vocabulary.OWL.<clinit>(OWL.java:37)
at com.hp.hpl.jena.ontology.ProfileRegistry.<clinit>(ProfileRegistry.java:48)
at com.hp.hpl.jena.ontology.OntModelSpec.<clinit>(OntModelSpec.java:54)
有什么问题?我找不到任何解决方案。