I want to use the OWL API from the following website:


I start my code with:

package org.coode.owlapi;

import static org.semanticweb.owlapi.vocab.OWLFacet.*;
import org.coode.owlapi.manchesterowlsyntax.ManchesterOWLSyntaxOntologyFormat;
import org.coode.owlapi.turtle.TurtleOntologyFormat;
import org.junit.Ignore;
import org.junit.Test;
import org.semanticweb.owlapi.apibinding.OWLManager;

I've downloaded a ZIP-file from the website. It contained 1 JAR-file.I added the Jar-file to the Classpath.. but in vain. On the first line, Eclipse tells me:

The declared package "org.coode.owl" does not match the expected package ""

Can somebody please tell me what to do :confused:

asked 17 Feb '13, 02:01

peniya's gravatar image

accept rate: 0%

closed 23 Feb '13, 15:21

Jeen%20Broekstra's gravatar image

Jeen Broekstra ♦


Why do you start your code with package org.coode.owlapi;? Try removing this line.

(17 Feb '13, 21:24) utapyngo utapyngo's gravatar image

-1 because of wrong forum for this question. Java+Eclipse basics should be asked somewhere else.

(23 Feb '13, 13:35) AKSWMember AKSWMember's gravatar image

The question has been closed for the following reason "Question is off-topic as it is about basic use of Java/Eclipse." by Jeen Broekstra 23 Feb '13, 15:21

You have to reference the library from within the project. (This is for Eclipse Helios) Right click on your project in Package Explorer and select Build Path > Add External Archives ...

  • Select the Jar you want to import.
  • Click on OK.

You should now see the Jar under a References Library folder in your project.

permanent link

answered 23 Feb '13, 11:45

Phil's gravatar image

accept rate: 28%

edited 23 Feb '13, 11:48

This does not address the actual problem, which is that the OP has declared his own class to be in package org.coode.owl, but (presumably) has not actually put it in that package. Looking at the error, it's probably just in the default package.

(23 Feb '13, 15:20) Jeen Broekstra ♦ Jeen%20Broekstra's gravatar image

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 17 Feb '13, 02:01

question was seen: 1,812 times

last updated: 23 Feb '13, 15:21