新书推介:《语义网技术体系》
作者:瞿裕忠,胡伟,程龚
   XML论坛     W3CHINA.ORG讨论区     计算机科学论坛     SOAChina论坛     Blog     开放翻译计划     新浪微博  
 
  • 首页
  • 登录
  • 注册
  • 软件下载
  • 资料下载
  • 核心成员
  • 帮助
  •   Add to Google

    >> 本版讨论Semantic Web(语义Web,语义网或语义万维网, Web 3.0)及相关理论,如:Ontology(本体,本体论), OWL(Web Ontology Langauge,Web本体语言), Description Logic(DL, 描述逻辑),RDFa,Ontology Engineering等。
    [返回] 中文XML论坛 - 专业的XML技术讨论区W3CHINA.ORG讨论区 - Web新技术讨论『 Semantic Web(语义Web)/描述逻辑/本体 』 → 本体建立的问题!!! 查看新帖用户列表

      发表一个新主题  发表一个新投票  回复主题  (订阅本版) 您是本帖的第 3489 个阅读者浏览上一篇主题  刷新本主题   树形显示贴子 浏览下一篇主题
     * 贴子主题: 本体建立的问题!!! 举报  打印  推荐  IE收藏夹 
       本主题类别:     
     wolf_xjf 帅哥哟,离线,有人找我吗?
      
      
      等级:大二(研究C++)
      文章:57
      积分:260
      门派:XML.ORG.CN
      注册:2006/3/26

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给wolf_xjf发送一个短消息 把wolf_xjf加入好友 查看wolf_xjf的个人资料 搜索wolf_xjf在『 Semantic Web(语义Web)/描述逻辑/本体 』的所有贴子 引用回复这个贴子 回复这个贴子 查看wolf_xjf的博客楼主
    发贴心情 本体建立的问题!!!

    今天总算把上次“求助”中提到的例子调试成功了,但换成自己的本体就出问题,研究半天看不出眉目,老出现:java.lang.OutOfMemoryError
                                  Exception in thread "main"
      这样的问题不知何解,望各位大侠不吝赐教。帖子长了点,望好心的大侠耐心指点,其中schema的文档如下:
    <?xml version="1.0"?>
    <!DOCTYPE rdf:RDF
              [<!ENTITY hhu "http://www.hhu.edu.cn#">
               <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">
               <!ENTITY owl "http://www.w3.org/2002/07/owl#">]>
    <rdf:RDF xmlns = "&hhu;"
             xmlns:hhu = "&hhu;"
             xml:base = "&hhu;"
             xmlns:xsd = "http://www.w3.org/2001/XMLSchema#"
             xmlns:owl = "http://www.w3.org/2002/07/owl#"   
             xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">

    <owl:Ontology rdf:about="">
        <rdfs:comment>An example OWL ontology</rdfs:comment>
          <rdfs:comment>Derived from the DAML Wine ontology at
          http://ontolingua.stanford.edu/doc/chimaera/ontologies/wines.daml
          Substantially changed, in particular the Region based relations.
        </rdfs:comment>
        <rdfs:label>owlDemoSchema</rdfs:label>
    </owl:Ontology>

    <owl:Class rdf:ID = "Teacher">
      <rdfs:subClassOf>
        <rdf:Description>
          <owl:intersectionOf rdf:parseType="Collection">
            <owl:Restriction>
              <owl:onProperty rdf:resource="#hasTNo" />
              <owl:allValuesFrom rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
              <owl:maxCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">1</owl:maxCardinality>
              <owl:minCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">1</owl:minCardinality>
            </owl:Restriction>
            <owl:Restriction>
              <owl:onProperty rdf:resource="#hasPosition" />  
              <owl:allValuesFrom rdf:resource="#Position" />
            </owl:Restriction>
          </owl:intersectionOf>
        </rdf:Description>
      </rdfs:subClassOf>
    </owl:Class>

    <owl:Class rdf:ID = "Mentor">  
      <rdfs:subClassOf>
        <rdf:Description>
          <owl:intersectionOf rdf:parseType="Collection">
            <owl:Class rdf:about= "#Teacher"/>
            <owl:Restriction>
               <owl:unionOf rdf:parseType="Collection">
                 <owl:Restriction>
                   <owl:onProperty rdf:resource="#hasPosition" />  
                   <owl:hasValue rdf:resource="#AssociateProfessor" />
                 </owl:Restriction>
                 <owl:Restriction>
                   <owl:onProperty rdf:resource="#hasPosition" />  
                   <owl:hasValue rdf:resource="#Professor" />
                 </owl:Restriction>
               </owl:unionOf>
            </owl:Restriction>
          </owl:intersectionOf>
        </rdf:Description>
      </rdfs:subClassOf>
    </owl:Class>
      
    <owl:Class rdf:ID = "Student">
      <rdfs:subClassOf>
        <rdf:Description>
          <owl:intersectionOf rdf:parseType="Collection">
            <owl:Restriction>
              <owl:onProperty rdf:resource="#hasSNo" />
              <owl:allValuesFrom rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
              <owl:maxCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">1</owl:maxCardinality>
              <owl:minCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">1</owl:minCardinality>
            </owl:Restriction>
          </owl:intersectionOf>
        </rdf:Description>
      </rdfs:subClassOf>
    </owl:Class>

    <owl:Class rdf:ID = "GradurateStudent">
      <rdfs:subClassOf>
        <owl:Class rdf:about = "#Student"/>
      </rdfs:subClassOf>
      <rdfs:subClassOf>
         <owl:Restriction>
            <owl:onProperty rdf:resource="#hasMentor" />
            <owl:allValuesFrom rdf:resource="#Mentor" />
            <owl:maxCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">1</owl:maxCardinality>
            <owl:minCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">1</owl:minCardinality>
         </owl:Restriction>
      </rdfs:subClassOf>              
    </owl:Class>

    <owl:Class rdf:ID = "Project">
      <rdfs:subClassOf>
        <owl:Restriction>
          <owl:onProperty rdf:resource="#hasNo" />
          <owl:allValuesFrom rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
          <owl:maxCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">1</owl:maxCardinality>
          <owl:minCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">1</owl:minCardinality>
        </owl:Restriction>
      </rdfs:subClassOf>
      <rdfs:subClassOf>
         <owl:Restriction>
            <owl:onProperty rdf:resource="#hasCredit" />
            <owl:allValuesFrom rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
            <owl:maxCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">1</owl:maxCardinality>
            <owl:minCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">1</owl:minCardinality>
         </owl:Restriction>
      </rdfs:subClassOf>  
    </owl:Class>

    <owl:Class rdf:ID = "Region">
      <owl:oneOf rdf:parseType="Collection">
        <owl:Thing rdf:about="#GC"/>
        <owl:Thing rdf:about="#SL"/>
        <owl:Thing rdf:about="#KX"/>
        <owl:Thing rdf:about="#SD"/>
      </owl:oneOf>
    </owl:Class>


    <owl:Class rdf:ID = "Position">
      <owl:oneOf rdf:parseType="Collection">
        <owl:Thing rdf:about="#AssociateProfessor"/>
        <owl:Thing rdf:about="#Professor"/>
        <owl:Thing rdf:about="#NomalTeacher"/>
      </owl:oneOf>
    </owl:Class>

    <owl:DatatypeProperty rdf:ID="hasTNo">
       <rdfs:domain rdf:resource="#Teacher" />
       <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string" />
    </owl:DatatypeProperty>

    <owl:DatatypeProperty rdf:ID="hasSNo">
       <rdfs:domain rdf:resource="#Student" />
       <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string" />
    </owl:DatatypeProperty>

    <owl:DatatypeProperty rdf:ID="hasNo">
       <rdfs:domain rdf:resource="#Project" />
       <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string" />
    </owl:DatatypeProperty>

    <owl:ObjectProperty rdf:ID="hasPosition">
       <rdfs:domain rdf:resource="#Teacher" />
       <rdfs:range rdf:resource="#Position" />
    </owl:ObjectProperty>


    <owl:ObjectProperty rdf:ID="hasMentor">
       <rdfs:domain rdf:resource="#GradurateStudent" />
       <rdfs:range rdf:resource="#Mentor" />
    </owl:ObjectProperty>

    <owl:ObjectProperty rdf:ID="teach">
       <rdfs:domain rdf:resource="#Teacher"/>
       <rdfs:range rdf:resource="#Project"/>
    </owl:ObjectProperty>

    <owl:ObjectProperty rdf:ID="elective">
       <rdfs:domain rdf:resource="#Student"/>
       <rdfs:range rdf:resource="#Project" />
    </owl:ObjectProperty>

    <owl:ObjectProperty rdf:ID="hasCredit">
       <rdfs:domain rdf:resource="#Project"/>
       <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string" />   
    </owl:ObjectProperty>    

    </rdf:RDF>
    data文档如下:
    <?xml version="1.0"?>
    <!DOCTYPE rdf:RDF
              [<!ENTITY hhu "http://www.hhu.edu.cn#">
               <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">
               <!ENTITY owl "http://www.w3.org/2002/07/owl#">]>
    <rdf:RDF xmlns = "&hhu;"
             xmlns:hhu = "&hhu;"
             xml:base = "&hhu;"
             xmlns:xsd = "http://www.w3.org/2001/XMLSchema#"
             xmlns:owl = "http://www.w3.org/2002/07/owl#"   
             xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">

    <Mentor rdf:ID="Wang">
      <hasTNo rdf:datatype="http://www.w3.org/2001/XMLSchema#string">9806</hasTNo>
      <hasPosition rdf:resource="#Professor"/>
      <teach rdf:resource="#ComputerScience"/>
    </Mentor>

    <Mentor rdf:ID="Wan">
      <hasTNo rdf:datatype="http://www.w3.org/2001/XMLSchema#string">9901</hasTNo>
      <hasPosition rdf:resource="#AssociateProfessor"/>
      <teach rdf:resource="#Network"/>
    </Mentor>

    <Mentor rdf:ID="Chen">
      <hasTNo rdf:datatype="http://www.w3.org/2001/XMLSchema#string">9703</hasTNo>
      <hasPosition rdf:resource="#Professor"/>
      <teach rdf:resource="#Software"/>
      <teach rdf:resource="#Compiler"/>
    </Mentor>

    <Teacher rdf:ID="Li">
      <hasTNo rdf:datatype="http://www.w3.org/2001/XMLSchema#string">0102</hasTNo>
      <hasPosition rdf:resource="#NomalTeacher"/>
      <teach rdf:resource="#English"/>
    </Teacher>


    <Teacher rdf:ID="Zhang">
      <hasTNo rdf:datatype="http://www.w3.org/2001/XMLSchema#string">0423</hasTNo>
      <hasPosition rdf:resource="#NomalTeacher"/>
      <teach rdf:resource="#AI"/>
      <teach rdf:resource="#Communicate"/>
    </Teacher>

    <Student rdf:ID="Yang">
      <hasSNo rdf:datatype="http://www.w3.org/2001/XMLSchema#string">0203</hasSNo>
      <elective rdf:resource="#English"/>
      <elective rdf:resource="#Network"/>
      <elective rdf:resource="#Software"/>
    </Student>

    <Student rdf:ID="Yin">
      <hasSNo rdf:datatype="http://www.w3.org/2001/XMLSchema#string">0231</hasSNo>
      <elective rdf:resource="#AI"/>
      <elective rdf:resource="#Network"/>
      <elective rdf:resource="#Communicate"/>
    </Student>

    <GradurateStudent rdf:ID="lu" >
      <hasSNo rdf:datatype="http://www.w3.org/2001/XMLSchema#string">0502</hasSNo>
      <hasMentor rdf:resource="Wang"/>
      <hasMentor>
        <rdf:Description rdf:about="#Dean"/>
      </hasMentor>  
    </GradurateStudent>

    <Project rdf:ID="English">
    <hasNo rdf:datatype="http://www.w3.org/2001/XMLSchema#string">001</hasNo>
    <hasCredit rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">16</hasCredit>
    </Project>

    <Project rdf:ID="ComputerScience">
    <hasNo rdf:datatype="http://www.w3.org/2001/XMLSchema#string">003</hasNo>
    <hasCredit rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">16</hasCredit>
    </Project>

    <Project rdf:ID="Network">
    <hasNo rdf:datatype="http://www.w3.org/2001/XMLSchema#string">027</hasNo>
    <hasCredit rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">10</hasCredit>
    </Project>

    <Project rdf:ID="Communicate">
    <hasNo rdf:datatype="http://www.w3.org/2001/XMLSchema#string">043</hasNo>
    <hasCredit rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">20</hasCredit>
    </Project>

    <Project rdf:ID="AI">
    <hasNo rdf:datatype="http://www.w3.org/2001/XMLSchema#string">016</hasNo>
    <hasCredit rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">10</hasCredit>
    </Project>

    <Project rdf:ID="Software">
    <hasNo rdf:datatype="http://www.w3.org/2001/XMLSchema#string">032</hasNo>
    <hasCredit rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">10</hasCredit>
    </Project>

    <Project rdf:ID="Compiler">
    <hasNo rdf:datatype="http://www.w3.org/2001/XMLSchema#string">022</hasNo>
    <hasCredit rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">16</hasCredit>
    </Project>

    </rdf:RDF>


       收藏   分享  
    顶(0)
      




    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2006/6/9 20:00:00
     
     jpz6311whu 帅哥哟,离线,有人找我吗?
      
      
      
      威望:9
      等级:研三(收到微软亚洲研究院的Offer了)(版主)
      文章:1718
      积分:10610
      门派:W3CHINA.ORG
      注册:2005/4/12

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给jpz6311whu发送一个短消息 把jpz6311whu加入好友 查看jpz6311whu的个人资料 搜索jpz6311whu在『 Semantic Web(语义Web)/描述逻辑/本体 』的所有贴子 引用回复这个贴子 回复这个贴子 查看jpz6311whu的博客2
    发贴心情 
    请楼主把程序贴出来看看
    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2006/6/9 22:02:00
     
     wolf_xjf 帅哥哟,离线,有人找我吗?
      
      
      等级:大二(研究C++)
      文章:57
      积分:260
      门派:XML.ORG.CN
      注册:2006/3/26

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给wolf_xjf发送一个短消息 把wolf_xjf加入好友 查看wolf_xjf的个人资料 搜索wolf_xjf在『 Semantic Web(语义Web)/描述逻辑/本体 』的所有贴子 引用回复这个贴子 回复这个贴子 查看wolf_xjf的博客3
    发贴心情 
    我的代码是:
        public static void main( String[] args ) {
              
                OntModel schema = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM, null );
          Model data = ModelFactory.createDefaultModel();
         
              schema.read("file:D:/java/testing/reasoners/bugs/hhuSchema.owl");
              data.read ("file:D:/java/testing/reasoners/bugs/hhuData.rdf");
                   Reasoner reasoner = ReasonerRegistry.getOWLReasoner();
             reasoner = reasoner.bindSchema(schema);
             InfModel infmodel = ModelFactory.createInfModel(reasoner,schema);
             Resource nForce = infmodel.getResource("http://www.hhu.edu.cn#Yin");
             System.out.println("nForce *:");
             new printStatements().ptStatement(infmodel, nForce, null, null);
                        
                        public class printStatements {
     
        protected void ptStatement(Model m, Resource s,Property p,Resource o) {
            for (StmtIterator i = m.listStatements(s,p,o); i.hasNext(); ) {
                Statement stmt = i.nextStatement();
                System.out.println(" - " + PrintUtil.print(stmt));
            }

        }
    }
    麻烦老大了!帮我看看

    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2006/6/10 14:39:00
     
     jpz6311whu 帅哥哟,离线,有人找我吗?
      
      
      
      威望:9
      等级:研三(收到微软亚洲研究院的Offer了)(版主)
      文章:1718
      积分:10610
      门派:W3CHINA.ORG
      注册:2005/4/12

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给jpz6311whu发送一个短消息 把jpz6311whu加入好友 查看jpz6311whu的个人资料 搜索jpz6311whu在『 Semantic Web(语义Web)/描述逻辑/本体 』的所有贴子 引用回复这个贴子 回复这个贴子 查看jpz6311whu的博客4
    发贴心情 
    OntModelSpec.OWL_MEM本身就很耗资源
    可以把虚拟机的最大最小值调整一下
    initial heap size:
    Larger of 1/64th of the machine's physical memory on the machine or some reasonable minimum. Before J2SE 5.0, the default initial heap size was a reasonable minimum, which varies by platform. You can override this default using the -Xms command-line option.

    maximum heap size:
    Smaller of 1/4th of the physical memory or 1GB. Before J2SE 5.0, the default maximum heap size was 64MB. You can override this default using the -Xmx command-line option.

    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2006/6/10 18:08:00
     
     wolf_xjf 帅哥哟,离线,有人找我吗?
      
      
      等级:大二(研究C++)
      文章:57
      积分:260
      门派:XML.ORG.CN
      注册:2006/3/26

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给wolf_xjf发送一个短消息 把wolf_xjf加入好友 查看wolf_xjf的个人资料 搜索wolf_xjf在『 Semantic Web(语义Web)/描述逻辑/本体 』的所有贴子 引用回复这个贴子 回复这个贴子 查看wolf_xjf的博客5
    发贴心情 
    多谢指点,但是老大,小弟初学者,还不知道在哪调整虚拟机的值,你能否指点一下,还有我的本体和程序有问题么?我感觉我的本体不算大啊!
    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2006/6/10 20:06:00
     
     jpz6311whu 帅哥哟,离线,有人找我吗?
      
      
      
      威望:9
      等级:研三(收到微软亚洲研究院的Offer了)(版主)
      文章:1718
      积分:10610
      门派:W3CHINA.ORG
      注册:2005/4/12

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给jpz6311whu发送一个短消息 把jpz6311whu加入好友 查看jpz6311whu的个人资料 搜索jpz6311whu在『 Semantic Web(语义Web)/描述逻辑/本体 』的所有贴子 引用回复这个贴子 回复这个贴子 查看jpz6311whu的博客6
    发贴心情 
    java - the Java application launcher
    Synopsis
    Description
    Options
    See Also
    SYNOPSIS
        java [ options ] class [ argument ... ]
        java [ options ] -jar file.jar [ argument ... ]
        javaw [ options ] class [ argument ... ]
        javaw [ options ] -jar file.jar [ argument ... ]

    options
    Command-line options.
    class
    Name of the class to be invoked.
    file.jar
    Name of the jar file to be invoked. Used only with -jar.
    argument
    Argument passed to the main function.
    DESCRIPTION
    The java tool launches a Java application. It does this by starting a Java runtime environment, loading a specified class, and invoking that class's main method.
    The method must be declared public and static, it must not return any value, and it must accept a String array as a para meter. The method declaration must look like the following:

        public static void main(String args[])

    By default, the first non-option argument is the name of the class to be invoked. A fully-qualified class name should be used. If the -jar option is specified, the first non-option argume nt is the name of a JAR archive containing class and resource f iles for the application, with the startup class indicated by the Main-Class manifest header.
    The Java runtime searches for the startup class, and other classes used, in three sets of locations: the bootstrap class path, the installed extensions, and the user class path.

    Non-option arguments after the class name or JAR file name are passed to the main function.

    The javaw command is identical to java, except that with javaw there is no associated console window. Use javaw when you don't want a command prompt window to appear. The javaw launcher will, however, display a dialog box with error information if a launch fails for some reason.

    OPTIONS
    The launcher has a set of standard options that are supported on the current runtime environment and will be supported in future releases. In addition, the default Java HotSpot VMs provide a set of non-standard options that are subject to change in future releases.
    Standard Options
    -client
    Select the Java HotSpot Client VM.
    For more information, see Server-Class Machine Detection


    -server
    Select the Java HotSpot Server VM.
    For more information, see Server-Class Machine Detection


    -agentlib:libname[=options]
    Load native agent library libname, e.g.
    -agentlib:hprof

    -agentlib:jdwp=help

    -agentlib:hprof=help

    For more information, see JVMTI Agent Command Line Options.


    -agentpath:pathname[=options]
    Load a native agent library by full pathname. For more information, see JVMTI Agent Command Line Options.

    -classpath classpath
    -cp classpath
    Specify a list of directories, JAR archives, and ZIP archives to search for class files. Class path entries are separated by semicolons (;). Specifying -classpath or -cp overrides any setting of the CLASSPATH environment variable.
    If -classpath and -cp are not used and CLASSPATH is not set, the user class path consists of the current directory (.).

    For more information on class paths, see Setting the Class Path.


    -Dproperty=value
    Set a system property value. If value is a string that contains spaces, you must enclose the string in double quotes:
            java -Dfoo="some string" SomeClass
            
    -enableassertions[:<package name>"..." | :<class name> ]
    -ea[:<package name>"..." | :<class name> ]
    Enable assertions. Assertions are disabled by default.
    With no arguments, enableassertions or -ea enables assertions. With one argument ending in "...", the switch enables assertions in the specified package and any subpackages. If the argument is simply "...", the switch enables assertions in the unnamed package in the current working directory. With one argument not ending in "...", the switch enables assertions in the specified class.

    If a single command line contains multiple instances of these switches, they are processed in order before loading any classes. So, for example, to run a program with assertions enabled only in package com.wombat.fruitbat (and any subpackages), the following command could be used:

    java -ea:com.wombat.fruitbat... <Main Class>

    The -enableassertions and -ea switches apply to all s loaders and to system classes (which do not have a class loader). There is one exception to this rule: in their no-argument form, the switches do not apply to system. This makes it easy to turn on asserts in all classes except for system classes. A separate switch is provided to enable asserts in all system classes; see -enablesystemassertions below.


    -disableassertions[:<package name>"..." | :<class ; ]
    -da[:<package name>"..." | :<class name> ]
    Disable assertions. This is the default.
    With no arguments, disableassertions or -da disables assertions. With one argument ending in "...", the switch disables assertions in the specified package and any subpackages. If the argument is simply "...", the switch disables assertions in the unnamed package in the rent working directory. With one argument not ending in "...", the switch disables assertions in the specified class.

    To run a program with assertions enabled in package com.wombat.fruitbat but disabled in class com.wombat.fruitbat.Brickbat, the following command could be used:

    java -ea:com.wombat.fruitbat... -da:com.wombat.fruitbat.Brickbat lt;Main Class>

    The -disableassertions and -da switches apply to all ss loaders and to system classes (which do not have a class loader). There is one exception to this rule: in their no-argument form, the switches do not apply to system. This makes it easy to turn on asserts in all classes except for system classes. A separate switch is provided to enable asserts in all system classes; see -disablesystemassertions below.


    -enablesystemassertions
    -esa
    Enable asserts in all system classes (sets the default assertion status for system classes to true).

    -disablesystemassertions
    -dsa
    Disables asserts in all system classes.

    -jar
    Execute a program encapsulated in a JAR file. The first argument is the name of a JAR file instead of a startup class name. In order for this option to work, the manifest of the JAR file must contain a line of the form Main-Class: classname. Here, classname identifies the class having the public static void main(String[] args) method that serves as your application's starting point. See the Jar tool reference page and the Jar trail of the Java Tutorial for information about working with Jar files and Jar-file manifests.
    When you use this option, the JAR file is the source of all user classes, and other user class path settings are ignored.


    -javaagent:jarpath[=options]
    Load a Java programming language agent, see java.lang.instrument.

    -verbose
    -verbose:class
    Display information about each class loaded.

    -verbose:gc
    Report on each garbage collection event.

    -verbose:jni
    Report information about use of native methods and other Java Native Interface activity.

    -version
    Display version information and exit.

    -showversion
    Display version information and continue.

    -?
    -help
    Display usage information and exit.

    -X
    Display information about non-standard options and exit.
    Non-Standard Options

    -Xint
    Operate in interpreted-only mode. Compilation to native code is disabled, and all bytecodes are executed by the interpreter. The performance benefits offered by the Java HotSpot Client VM's adaptive compiler will not be present in this mode.

    -Xbatch
    Disable background compilation. Normally the VM will compile the method as a background task, running the method in interpreter mode until the background compilation is finished. The -Xbatch flag disables background compilation so that compilation of all methods proceeds as a foreground task until completed.

    -Xdebug
    Start with support for JVMDI enabled. JVMDI has been deprecated and is not used for debugging in J2SE 5.0, so this option isn't needed for debugging in J2SE 5.0.

    -Xbootclasspath:bootclasspath
    Specify a semicolon-separated list of directories, JAR archives, and ZIP archives to search for boot class files. These are used in place of the boot class files included in the Java 2 SDK. Note: Applications that use this option for the purpose of overriding a class in rt.jar should not be deployed as doing so would contravene the Java 2 Runtime Environment binary code license.

    -Xbootclasspath/a:path
    Specify a semicolon-separated path of directires, JAR archives, and ZIP archives to append to the default bootstrap class path.

    -Xbootclasspath/p:path
    Specify a semicolon-separated path of directires, JAR archives, and ZIP archives to prepend in front of the default bootstrap class path. Note: Applications that use this option for the purpose of overriding a class in rt.jar should not be deployed as doing so would contravene the Java 2 Runtime Environment binary code license.

    -Xcheck:jni
    Perform additional checks for Java Native Interface (JNI) functions. Specifically, the Java Virtual Machine validates the parameters passed to the JNI function as well as the runtime environment data before processing the JNI request. Any invalid data encountered indicates a problem in the native code, and the Java Virtual Machine will terminate with a fatal error in such cases. Expect a performance degradation when this option is used.

    -Xfuture
    Perform strict class-file format checks. For purposes of backwards compatibility, the default format checks performed by the Java 2 SDK's virtual machine are no stricter than the checks performed by 1.1.x versions of the JDK software. The -Xfuture flag turns on stricter class-file format checks that enforce closer conformance to the class-file format specification. Developers are encouraged to use this flag when developing new code because the stricter checks will become the default in future releases of the Java application launcher.

    -Xnoclassgc
    Disable class garbage collection.


    -Xincgc
    Enable the incremental garbage collector. The incremental garbage collector, which is off by default, will reduce the occasional long garbage-collection pauses during program execution. The incremental garbage collector will at times execute concurrently with the program and during such times will reduce the processor capacity available to the program.

    -Xloggc:file
    Report on each garbage collection event, as with -verbose:gc, but log this data to file. In addition to the information -verbose:gc gives, each reported event will be preceeded by the time (in seconds) since the first garbage-collection event.
    Always use a local file system for storage of this file to avoid stalling the JVM due to network latency. The file may be truncated in the case of a full file system and logging will continue on the truncated file. This option overrides -verbose:gc if both are given on the command line.


    -Xmsn
    Specify the initial size, in bytes, of the memory allocation pool. This value must be a multiple of 1024 greater than 1MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. The default value is 2MB. Examples:
           -Xms6291456
           -Xms6144k
           -Xms6m
           

    -Xmxn
    Specify the maximum size, in bytes, of the memory allocation pool. This value must a multiple of 1024 greater than 2MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. The default value is 64MB. Examples:
           -Xmx83886080
           -Xmx81920k
           -Xmx80m
           

    -Xprof
    Profiles the running program, and sends profiling data to standard output. This option is provided as a utility that is useful in program development and is not intended to be be used in production systems.

    -Xrunhprof[:help][:<suboption>=<value>,...]
    Enables cpu, heap, or monitor profiling. This option is typically followed by a list of comma-separated "<suboption>=<value>" pairs . Run the command java -Xrunhprof:help to obtain a list of suboptions and their default values.

    -Xrs
    Reduces usage of operating-system signals by the Java virtual machine (JVM). This option is available beginning with J2SE 1.3.1.
    In J2SE 1.3.0, the Shutdown Hooks facility was added to allow orderly shutdown of a Java application. The intent was to allow user cleanup code (such as closing database connections) to run at shutdown, even if the JVM terminates abruptly.

    The JVM watches for console control events to implement shutdown hooks for abnormal JVM termination. Specifically, the JVM registers a console control handler which begins shutdown-hook processing and returns TRUE for CTRL_C_EVENT, CTRL_CLOSE_EVENT, CTRL_LOGOFF_EVENT, and CTRL_SHUTDOWN_EVENT.

    The JVM uses a similar mechanism to implement the pre-1.2 feature of dumping thread stacks for debugging purposes. Sun's JVM uses CTRL_BREAK_EVENT to perform thread dumps.

    If the JVM is run as a service (for example, the servlet engine for a web server), it can receive CTRL_LOGOFF_EVENT but should not initiate shutdown since the operating system will not actually terminate the process. To avoid possible interference such as this, the -Xrs command-line option has been added beginning with J2SE 1.3.1. When the -Xrs option is used on Sun's JVM, the JVM does not install a console control handler, implying that it does not watch for or process CTRL_C_EVENT, CTRL_CLOSE_EVENT, CTRL_LOGOFF_EVENT, or CTRL_SHUTDOWN_EVENT.

    There are two consequences of specifying -Xrs:

    Ctrl-Break thread dumps are not available.
    User code is responsible for causing shutdown hooks to run, for example by calling System.exit() when the JVM is to be terminated.

    -Xssn
    Set thread stack size.
    SEE ALSO
    javac - the Java programming language compiler
    jdb - Java Application Debugger
    javah - C Header and Stub File Generator
    jar - JAR Archive Tool
    The Java Extensions Framework
    Security Features.

    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2006/6/10 21:40:00
     
     wolf_xjf 帅哥哟,离线,有人找我吗?
      
      
      等级:大二(研究C++)
      文章:57
      积分:260
      门派:XML.ORG.CN
      注册:2006/3/26

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给wolf_xjf发送一个短消息 把wolf_xjf加入好友 查看wolf_xjf的个人资料 搜索wolf_xjf在『 Semantic Web(语义Web)/描述逻辑/本体 』的所有贴子 引用回复这个贴子 回复这个贴子 查看wolf_xjf的博客7
    发贴心情 
    小弟愚顿,看不懂,老大能用中文给我描述一下么?我始终怀疑是本体的问题,换个jena自带的本体程序就行?我把我的本体简化了还是不行!小弟有急用,望好心的大哥帮帮忙
    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2006/6/11 0:46:00
     
     blsai 帅哥哟,离线,有人找我吗?
      
      
      等级:大一新生
      文章:4
      积分:71
      门派:XML.ORG.CN
      注册:2006/5/11

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给blsai发送一个短消息 把blsai加入好友 查看blsai的个人资料 搜索blsai在『 Semantic Web(语义Web)/描述逻辑/本体 』的所有贴子 引用回复这个贴子 回复这个贴子 查看blsai的博客8
    发贴心情 
    楼主是河大的吗?小弟也是河大的!想向你请教!我的QQ 29838504
    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2006/6/11 23:07:00
     
     happy++ 帅哥哟,离线,有人找我吗?魔羯座1982-12-22
      
      
      等级:大二期末(C++考了100分!)
      文章:65
      积分:312
      门派:XML.ORG.CN
      注册:2005/11/4

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给happy++发送一个短消息 把happy++加入好友 查看happy++的个人资料 搜索happy++在『 Semantic Web(语义Web)/描述逻辑/本体 』的所有贴子 引用回复这个贴子 回复这个贴子 查看happy++的博客9
    发贴心情 

    import com.hp.hpl.jena.rdf.model.*;
    import com.hp.hpl.jena.ontology.*;
    import com.hp.hpl.jena.reasoner.*;
    import com.hp.hpl.jena.util.*;

    public class Test{
        public static void main( String[] args ) {
              
          OntModel schema = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM, null );
          Model data = ModelFactory.createDefaultModel();
          
          schema.read("file:D:/java/testing/reasoners/bugs/hhuSchema.owl");
          data.read ("file:D:/java/testing/reasoners/bugs/hhuData.rdf");
          Reasoner reasoner = ReasonerRegistry.getOWLReasoner();
             reasoner = reasoner.bindSchema(schema);
             InfModel infmodel = ModelFactory.createInfModel(reasoner,data);
             Resource nForce = infmodel.getResource("http://www.hhu.edu.cn#Yin");
             System.out.println("nForce *:");
             new printStatements().ptStatement(infmodel, nForce, null, null);
           }             

    }

    class printStatements {

     protected void ptStatement(Model m, Resource s,Property p,Resource o) {
        for (StmtIterator i = m.listStatements(s,p,o); i.hasNext(); ) {
                Statement stmt = i.nextStatement();
                System.out.println(" - " + PrintUtil.print(stmt));
            }

        }
    }


    我这边能出结果,楼主自己试试吧。

    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2006/6/12 0:02:00
     
     wolf_xjf 帅哥哟,离线,有人找我吗?
      
      
      等级:大二(研究C++)
      文章:57
      积分:260
      门派:XML.ORG.CN
      注册:2006/3/26

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给wolf_xjf发送一个短消息 把wolf_xjf加入好友 查看wolf_xjf的个人资料 搜索wolf_xjf在『 Semantic Web(语义Web)/描述逻辑/本体 』的所有贴子 引用回复这个贴子 回复这个贴子 查看wolf_xjf的博客10
    发贴心情 
    谢谢热心的楼上,若不是你帮我尝试,我还没意识到问题的原因,谢谢!谢谢!谢谢!
    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2006/6/12 1:38:00
     
     GoogleAdSense
      
      
      等级:大一新生
      文章:1
      积分:50
      门派:无门无派
      院校:未填写
      注册:2007-01-01
    给Google AdSense发送一个短消息 把Google AdSense加入好友 查看Google AdSense的个人资料 搜索Google AdSense在『 Semantic Web(语义Web)/描述逻辑/本体 』的所有贴子 访问Google AdSense的主页 引用回复这个贴子 回复这个贴子 查看Google AdSense的博客广告
    2025/9/4 0:56:09

    本主题贴数10,分页: [1]

    管理选项修改tag | 锁定 | 解锁 | 提升 | 删除 | 移动 | 固顶 | 总固顶 | 奖励 | 惩罚 | 发布公告
    W3C Contributing Supporter! W 3 C h i n a ( since 2003 ) 旗 下 站 点
    苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
    2,437.988ms