Loading...
Logo
Processing Forum
Hello,

I can't import the twitter4j library on processing. I googled a lot and everyone is proposing the same solution renaming a file with .jar extension. However I can't find that file anywhere inside the twitter4j unzipped folder. I have tried both with the latest version of twitter4j and with the version 2.2.6 (can't find any older). I am running processing 2.0.1. Any tips?

thanks in advance,
t

Replies(8)

Perhaps you have the wrong download, people often download the source code instead of the binary library itself. (This is often confusing with open source repositories.)
thanks for the quick response. I donwloaded this one

http://twitter4j.org/en/index.html#download

so I guess I have downloaded the correct one,right?
Yes, that the right one (3.0.3) with download link: http://twitter4j.org/archive/twitter4j-3.0.3.zip

The jars are in: twitter4j-3.0.3\lib
hey, the jar files ara zipped right? although inside the lib folder there are a lot of zipped files none of them has a .jar extenesion...should I see a .jar extension,shouldn't I?
jar files are a kind of zip-files. See: http://en.wikipedia.org/wiki/JAR_%28file_format%29

Those 'zip files' you are seeing inside the lib folder ARE the jars. And they DO have the extension .jar. Perhaps on your computer they are given a zip-file icon or something, but that's them. No need to further unpack them.
thanks for the help. Those are indeed the .jar files but the problem I was facing was the following and I am posting my solution for everyone who has the same problem in the future.....

the guidelines that are around the web say at some point

4) Place all contents of the "twitter4j224" folder into a folder called "library", which is inside the "twitter4j224" folder
5) Rename "twitter4j-core-2.2.6.jar" in the "library" folder to "twitter4j224.jar". This file was initially in the "lib" folder, in 4. step we moved it to a folder called library and now we're just modifying it's name

There isn't any library folder inside twitter4jxxx (at least on the newest version). I renamed the lib folder and named it "library". Now everything works.

Hopefully this help some people in the future. Maybe was something I didn't get right all this time but anyway...


You did it!

Thanks for sharing the additional info for future reference.