-1
1

Hi.

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

http://owlapi.sourceforge.net/

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

peniya
92
accept rate: 0%

closed 23 Feb '13, 15:21

Jeen%20Broekstra's gravatar image

Jeen Broekstra ♦
11.5k412

2

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

-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.

link

answered 23 Feb '13, 11:45

Phil's gravatar image

Phil
1536
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

By RSS:

Answers

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

Tags:

×596

Asked: 17 Feb '13, 02:01

Seen: 1,281 times

Last updated: 23 Feb '13, 15:21