twy009987
twy009987

Reputation: 11

Imported library not recognized in Eclipse

I'm have a problem importing a library. I first tried importing it as an external library, which leads to this: enter image description here

...afterwards, I searched StackOverflow, created a folder named /libs, and copied the JAR there, but it still doesn't work: enter image description here

Any pointers?

Thanks you!

Upvotes: 0

Views: 10247

Answers (2)

icza
icza

Reputation: 418625

You also have to add the external library (TSim.jar) to the build path of your project. A .jar just being in the project folder does not automatically make it part of the class path.

Right click on project name => Properties => Java Build Path => Libraries tab => Add JARs... => and select your TSim.jar

You might need to do a Clean/Rebuild after this.

Upvotes: 2

SpringLearner
SpringLearner

Reputation: 13854

first clean the project.Follow the steps

  1. go to project tab
  2. click clean
  3. select your project and clean

next add the jar.Follow the steps

  1. right click on project
  2. click buildpath->configure buildpath
  3. click the libraries tab
  4. click on add external jars and give the path of the jar

Upvotes: 0

Related Questions