user2974665
user2974665

Reputation: 35

Importing jdom to eclipse project

I am trying to use the jdom 2.0.5 library and I have gone through the steps of importing it and configuring the build path but when I attempt to import the libraries I get an error saying "the import cannot be resolved"

Upvotes: 2

Views: 9887

Answers (1)

A4L
A4L

Reputation: 17595

"the import cannot be resolved"

means either you have a misspelling somewhere in the import directive or you haven't configured the build path correctly. If you have, then after using a jdom Class in your code organize the import using Ctrl-Shift+o. If you haven't then configure your class path correctly by one of the following methods:

  1. Download jdom2 jars and save them somewhere. Configure your build path as described here.

  2. Convert your project to a maven project and add the following dependency in the pom.xml file:

    <dependency>
        <groupId>org.jdom</groupId>
        <artifactId>jdom2</artifactId>
        <version>2.0.5</version>
    </dependency>
    

Upvotes: 4

Related Questions