以文本方式查看主题

-  W3CHINA.ORG讨论区 - 语义网·描述逻辑·本体·RDF·OWL  (http://bbs.xml.org.cn/index.asp)
--  『 Semantic Web(语义Web)/描述逻辑/本体 』  (http://bbs.xml.org.cn/list.asp?boardid=2)
----  编写查询程序运行时出现错误 java.lang.NoClassDefFoundError: com/jena/rule/reasoner/Test  (http://bbs.xml.org.cn/dispbbs.asp?boardid=2&rootid=&id=84880)


--  作者:nevious
--  发布时间:5/22/2010 5:25:00 PM

--  编写查询程序运行时出现错误 java.lang.NoClassDefFoundError: com/jena/rule/reasoner/Test
小弟写了个查询本体的程序,但是无法运行。程序如下
package com.jena.rule.reasoner;

import com.hp.hpl.jena.rdf.model.Model;
import com.hp.hpl.jena.rdf.model.ModelFactory;
import com.hp.hpl.jena.rdf.model.Resource;
import com.hp.hpl.jena.rdf.model.*;
public class Test {
     public static void main(String[] args){
 Model model = ModelFactory.createDefaultModel();
 model.read("file:newshit.owl");
 String NS = "http://www.owl-ontologies.com/Ontology/newshit.owl#";
 Resource self11 = model.getResource(NS + "self11");
 model.listStatements(self11,null,(RDFNode)null);
 }
}

报错:java.lang.NoClassDefFoundError: com/jena/rule/reasoner/Test
Exception in thread "main"

请好心的大侠帮帮忙!!!


W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
7,148.438ms