On 12/08/13 10:05, Samir Hamitouche wrote:
Please don't reply to some unrelated message on the list. People
reading by threads may not see your message.
> $ javac web1.java
> web1.java:1: error: package com.hp.hpl.jena.rdf.model does not exist
> import com.hp.hpl.jena.rdf.model.ModelFactory;
> ^
You must set the classpath for compilation. Search the web for general
instructions for doing this. It is not Jena-specific.
It is easier to use an IDE such as Eclipse. It is much easier and
productive than doing everything on the command line.
Andy
Hello,
i write a small java program to read an XML/RDF file in my desktop in eclipse
using the jena library this is the program:
import com.hp.hpl.jena.rdf.model.ModelFactory;
import com.hp.hpl.jena.rdf.model.Model;
import java.io.PrintWriter;
import java.util.Iterator;
public class web1 {
private String etudNS ="path .. /resDoc.rdf";
/**
* @param args
*/
public static void main(String[] args) {
web1 etudRDF = new web1();
}
public void load() {
Model model = ModelFactory.createDefaultModel();
model.read(etudNS);
model.write(System.out);
model.write (new PrintWriter(System.out));
}
}
when i compile i had this:
$ javac web1.java
web1.java:1: error: package com.hp.hpl.jena.rdf.model does not exist
import com.hp.hpl.jena.rdf.model.ModelFactory;
^
web1.java:2: error: package com.hp.hpl.jena.rdf.model does not exist
import com.hp.hpl.jena.rdf.model.Model;
^
web1.java:18: error: cannot find symbol
Model model = ModelFactory.createDefaultModel();
^
symbol: class Model
location: class web1
web1.java:18: error: cannot find symbol
Model model = ModelFactory.createDefaultModel();
^
symbol: variable ModelFactory
location: class web1
4 errors
Anyone can help me
Thank you
Best regards
Samir