Information Systems Group

― Knowledge Representation and Reasoning

Hermit OWL Reasoner

The New Kid on the OWL Block

Using HermiT in Java applications

To get started programming with HermiT, try building and running a trivial demo program (or download one here). Compile the demo with

  javac -cp HermiT.jar

and then run the program with the following command, where for Windows replace the colon (:) with a semicolon(;):

  java -cp .:HermiT.jar Demo

HermiT 1.2 has native support for working with objects such as ontologies and class expression from the OWL API 3.0.0.

You can now instantiate HermiT in your demo program by creating an instance of the Reasoner class in the package org.semanticweb.HermiT. The following code loads an ontology, creates a reasoner object and outputs whether the ontology is consistent (assuming HermiT.jar is on your classpath).

  OWLOntologyManager m=OWLManager.createOWLOntologyManager();
  OWLOntology o=m.loadOntologyFromOntologyDocument(IRI.create("someIRI"));
  Reasoner hermit=new Reasoner(o);

To use the OWLReasoner interface from the OWL API (package org.semanticweb.owlapi.inference) instead of HermiT's Reasoner class, the third line above has to be replaced with:

OWLReasoner reasoner=new Reasoner.ReasonerFactory().createReasoner(o);

HermiT is licensed under the LGPL, so you are free to modify and extend the reasoner to suit your needs. The release includes a folder project, which contains an Eclipse Java project including all libraries and sources. Some Javadoc is included within the standard HermiT distribution, and can be extracted with the following command:

   jar -xf HermiT.jar javadoc


To use HermiT with Maven, add the following to the dependencies section of your pom file.


The maven version number is the same as main version, with intermediate point releases when the OWL API is updated.