For the following code:
Model m2=ModelFactory.createDefaultModel();
m2.read("Untitled.xml");
I get the error: Exception in thread "main" com.hp.hpl.jena.shared.JenaException: java.net.MalformedURLException: no protocol: Untitled.xml
Could anyone please help me out?
它期望一个url,尝试m2.read(new File("Untitled.xml").toURL().toString());
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.