i have tried to use jena in netbeans to read owl file from ontology 3.4.6, but 
there is many errors spicially in read() method.
the code is:
OntModel m = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM, null );
               m.getDocumentManager().addAltEntry( 
http://www.w3.org/2001/sw/WebOnt/guide-src/carads,
                                            "file:carads.owl");
  m.read( "file:carads.owl" );
the errors are:
Exception in thread "main" java.io.FileNotFoundException: carads.owl (The 
system cannot find the file specified)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(FileInputStream.java:106)
        at java.io.FileInputStream.<init>(FileInputStream.java:66)
        at 
sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70)
        at 
sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161)
        at java.net.URL.openStream(URL.java:1010)
        at com.hp.hpl.jena.rdf.model.impl.ModelCom.read(ModelCom.java:209)
        at 
com.hp.hpl.jena.ontology.impl.OntModelImpl.read(OntModelImpl.java:2130)
        at 
com.hp.hpl.jena.ontology.impl.OntModelImpl.read(OntModelImpl.java:2100)
        at 
com.hp.hpl.jena.ontology.impl.OntModelImpl.read(OntModelImpl.java:2061)
        at testing55.Main.main(Main.java:34)
com.hp.hpl.jena.shared.WrappedIOException: rethrew: 
java.io.FileNotFoundException: carads.owl (The system cannot find the file 
specified)
        at com.hp.hpl.jena.rdf.model.impl.ModelCom.read(ModelCom.java:213)
        at 
com.hp.hpl.jena.ontology.impl.OntModelImpl.read(OntModelImpl.java:2130)
        at 
com.hp.hpl.jena.ontology.impl.OntModelImpl.read(OntModelImpl.java:2100)
        at 
com.hp.hpl.jena.ontology.impl.OntModelImpl.read(OntModelImpl.java:2061)
        at testing55.Main.main(Main.java:34)
Caused by: java.io.FileNotFoundException: carads.owl (The system cannot find 
the file specified)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(FileInputStream.java:106)
        at java.io.FileInputStream.<init>(FileInputStream.java:66)
        at 
sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70)
        at 
sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161)
        at java.net.URL.openStream(URL.java:1010)
        at com.hp.hpl.jena.rdf.model.impl.ModelCom.read(ModelCom.java:209)
        ... 4 more
Java Result: 1
please ,i need help quickly. because i hve tried many methods to load the file 
bu i cannot do it.
thanks. 

Reply via email to