11

I'm using the twitter4j 2.1.11 jar, but Eclipse doesn't seem to be able to find classes within it. I added the jar as a referenced library, but get Twitter cannot be resolved to a type when trying to use it. I can add imports like import twitter4j.* but not import twitter4j.Twitter.

I can tell the class is available as it is present when I open the jar in an archive viewer. How can I get Eclipse to behave?

Ross
  • 46,186
  • 39
  • 120
  • 173

1 Answers1

16

The problem I was having was that I was importing the wrong archive, specifically the sources archive rather than the one found in /lib of the twitter4j download.

Ross
  • 46,186
  • 39
  • 120
  • 173
  • I had forgotten about this question. I'd like to think SO isn't purely about rep gain though. – Ross May 05 '11 at 14:30