Question

Hi all I have a java program inside it I have imported these classes.

  1. import com.hp.hpl.mesa.rdf.jena.mem.ModelMem;
  2. import com.hp.hpl.mesa.rdf.jena.model.*;
  3. import com.hp.hpl.mesa.rdf.jena.common.PropertyImpl;

when I'm trying to compile the program it shows 3 errors which are:

  1. package com.hp.hpl.mesa.rdf.jena.mem does not exist import com.hp.hpl.mesa.rdf.jena.mem.ModelMem;
  2. package com.hp.hpl.mesa.rdf.jena.model does not exist import com.hp.hpl.mesa.rdf.jena.model.*;
  3. package com.hp.hpl.mesa.rdf.jena.common does not exist import com.hp.hpl.mesa.rdf.jena.common.PropertyImpl;

I have tried to search for the jar files but I couldn't, is anyone has the link to download the jar file of those packages.

Was it helpful?

Solution

The Jena packages are under com.hp.hpl.jena.rdf…. I don't know where you got this com.hp.hpl.mesa.rdf.jena… package name from, but it's definitely wrong. Maybe you're using an obsolete example from an ancient Jena version?

There shouldn't be any reason to import ModelMem or PropertyImpl directly. If you need a ModelMem, use ModelFactory.createDefaultModel(). If you need a property instance, use model.createProperty().

You can download the Jena jars from the Jena download site.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top