Contributed Libraries

This tutorial is an updated version of Section 12.3: Contributed Libraries. Processing now allows for a “libraries” folder inside your Processing sketchbook, which is a great deal more convenient than having your 3rd party libraries installed in the Processing application folder. Now, when you upgrade to a new version of Processing you don’t have to copy your libraries over.

As of the writing of this book, there are 47 contributed libraries, with capabilities ranging from sound
generation and analysis, to packet sniffing, to physics simulations, to GUI controls. Several of these
contributed libraries are demonstrated in this book’s examples. Here, we will take a look at the process of downloading and installing a contributed library.

Where to install them

First, locate where your Processing sketchbook. This is the default directory of all of your Processing sketches. On a mac, this will usually be:


on a PC, it’s probably:

c:/My Documents/Processing/

If it doesn’t already exist, create a folder called “libraries” here. This is where you’ll install the 3rd party libraries. An example of a contributed library is one used with this book: SimpleML, a library for making asynchronous requests for raw data from web pages and/or XML feeds. You can download the library from this link.

How to install them

Step 1. Extract the ZIP file. This can usually be accomplished by double-clicking the file or with any decompression application, such as Winzip on a PC.

Step 2. Copy the extracted files to the Processing libraries folder. Most libraries you download will automatically unpack with the right directory structure. The full directory structure should look like this:


More generically:


Some libraries may include additional files in the “library” folder, as well as the source code (which is commonly stored one directory up, in the “libraryName” folder). If the library does not automatically unpack itself with the above directory structure, you can manually create these folders (using the finder or explorer) and place the libraryName.jar file in the appropriate location yourself.

Step 3. Restart Processing. If Processing was running while you performed Step 2, you will need to quit Processing and restart it in order for the library to be recognized. Once you have restarted, if everything has gone according to plan, the library will appear under the “Sketch → Import Library.”

What to do once you have installed the library really depends on which library you have installed. Examples that make use in code of a contributed library can be found in Chapter 18 (simpleML, "">Yahoo API) and Chapter 20 (Sonia, Minim).

(Note that the process for installing other contributed libraries will be identical, with the exception of filenames.)

  • kyle

    thank you!

  • Kleajmp Fidich

    thanks this saved my day!

  • Cshyg0516

    Hi i’m really depressed coz i’ve followed every steps about create “libraries” folder under sketch folder but still I can’t see 3rd library in Import Library..
    Why didn’t it appear ?? 

    ps : my library is for ‘opencv’.  

  • Lala

    This is very precise, thank you!

  • oamar

    help! i have created a folder caller libraries in “my documents” on my mac and pasted the folders inside it and it does not work. please help. 

  • Anonymous

    The folder “libraries” needs to be inside the Processing sketch folder.  On a mac this is usually /Documents/Processing/libraries

  • Info


  • Idee17

    hey oamar you need to go into the folder called Processing then create a folder call libraries in there. after you do that your free to drop in the library that your missing

  • Davidamiel Design

    for me still not working I downloaded a library for generative design my path is : user/david/documents/Processing/libraries/generativedesign/library/01_P/P_1_2_1_01/P_1_2_1_01.pde ( no .jar inside)

  • shiffman

    something is wrong with the library itself.  it has to have a jar to work. that seems more like an example, not a library.

  • Mbk38

    hi! i have followed your steps. The tuio library is in users/myname/documents/processing and nothing shows up in import library or sketchbook. i have the same problem with my arduino that uses the same setup. I’ve restarted processing. I cant figure it out. Please help! 

  • Coconnell

    I love this app

  • Milodog

    dude, i dnt understand wht u r saying… its like another language

  • Spencerofusa

    it was the best thing in my life i want to do it every day

  • Shiriz

    Hi, hope someone can help me. I successfully installed OpenCV, and it showed up on my Sketch > Import Library. However, when I run my codes, it says: 
    “UnsatifisiedLinkError:”I am clueless why its not working. Any idea how to rectify the problem?

  • Jordan Stefanelli

    It doesn’t go in your sketch folder – it goes in the processing folder (where your processing application file is, either Processing.EXE for windows or Processing.APP for mac). I made this mistake as well.

  • Chris Sullivan

    hey.. this may be a bit unrelated to the topic above but.. I was wondering if any of you can tell me why the Sonia (sound app) does not come up when i go to my sketch import library section.. please anybody help me with this.

  • shiffman

    Is the library installed in your libraries folder? The paths must be correct and the name of the JAR files must match the folder name. Sonia is rather out of date and may not be compatible with Processing 2.0. I would suggest using MInim.

  • George Profenza

    OpenCV connects to a bit of c++ code behind the scenes and you have an extra step (other than adding the Processing wrapper lib to Processing’s libraries folder): Installing the OpenCV framework (which I think it’s version 1.0), so for Mac: and for Windows:

  • philippe castellin

    p5 1.5.1 on mac OSX 1.6.8, java 6 : works fine

    i have downloaded p5 2.07b and tried to launch it

    it seems to launch, shows the first image and then quit

    same thing with 2.06…

    in the console window allways the same error message:

    29/12/12 14:48:45 [0x0-0x51051][638] Exception in thread “AWT-EventQueue-0″ java.lang.NullPointerException

    29/12/12 14:48:45 [0x0-0x51051][638] at

    29/12/12 14:48:45 [0x0-0x51051][638] at

    29/12/12 14:48:45 [0x0-0x51051][638] at

    29/12/12 14:48:45 [0x0-0x51051][638] at$000(

    29/12/12 14:48:45 [0x0-0x51051][638] at$

    29/12/12 14:48:45 [0x0-0x51051][638] at java.awt.event.InvocationEvent.dispatch(

    29/12/12 14:48:45 [0x0-0x51051][638] at java.awt.EventQueue.dispatchEventImpl(

    29/12/12 14:48:45 [0x0-0x51051][638] at java.awt.EventQueue.access$000(

    29/12/12 14:48:45 [0x0-0x51051][638] at java.awt.EventQueue$

    29/12/12 14:48:45 [0x0-0x51051][638] at java.awt.EventQueue$

    29/12/12 14:48:45 [0x0-0x51051][638] at Method)

    29/12/12 14:48:45 [0x0-0x51051][638] at$1.doIntersectionPrivilege(

    29/12/12 14:48:45 [0x0-0x51051][638] at java.awt.EventQueue.dispatchEvent(

    29/12/12 14:48:45 [0x0-0x51051][638] at java.awt.EventDispatchThread.pumpOneEventForFilters(

    29/12/12 14:48:45 [0x0-0x51051][638] at java.awt.EventDispatchThread.pumpEventsForFilter(

    29/12/12 14:48:45 [0x0-0x51051][638] at java.awt.EventDispatchThread.pumpEventsForHierarchy(

    29/12/12 14:48:45 [0x0-0x51051][638] at java.awt.EventDispatchThread.pumpEvents(

    29/12/12 14:48:45 [0x0-0x51051][638] at java.awt.EventDispatchThread.pumpEvents(

    29/12/12 14:48:45 [0x0-0x51051][638] at

    what is wrong???
    thanks in advance

  • philippe castellin

    i found myself the answer
    changing the authorizations for the libraries folder to “everyone reading & writing” and now p5 2.0b7 launches ok
    but i cannot understand why i had to do that ,as 1.5.1 runs without this change….
    i have seen that others users have the same problem
    hoping that it helps them!
    ph c.

  • Dan

    Hey there! Turtorial is great so far…
    But now i´ve got an other Problem with this string:

    String timestamp() {
    Calendar now = Calendar.getInstance();
    return String.format(“%1$ty%1$tm%1$td_%1$tH%1$tM%1$tS”, now);

    Allert is:
    Cannot find a class or type named “Calendar”

    Got any Idea ?


  • Max

    Anybody founnd a solution to this already? I’m running into the same problem.

  • Max

    Found this in a different forum and it worked for me:

    Try adding the following import:

    import java.util.Calendar;

  • Scott

    I’m getting a 404 at GitHub from the SimpleML dl link. Can anyone provide a new address?

  • shiffman

    SimpleML is deprecated. You can do everything with new features in Processing 2.0. Sorry, update to the book is coming soon!

  • Scott

    The amount of free knowledge I’m getting from you means there’s no need to apologise! Thanks for getting back to me. Keep up the good work!

  • PJ

    Great tutorial, just what I’m looking for!
    One problem, when I try to run the processing code It says ‘no library found for simpleML’. I have the newest version of processing 2.
    I can’t even find the library in the Import library section.
    Any help would be great, thanks!

  • shiffman

    SimpleML is deprecated. You can do everything with new features in Processing 2.0. Sorry, update to the book is coming soon!

  • PJ

    Thanks for you quick reply

  • KesterR

    My folder structure looks like this:


    but it’s still not working when I do import jheatchart.*; or Sketch>Import Library

    Any other clues please?


  • shiffman

    jar name and folder name have to match

  • KesterR

    Thanks! Tried:


    (Closed and re-opened Processing in between.)

    Also tried

    import jheatchart.*;


    import jheatchart-0.6.*;

    Still doesn’t work. Any other suggestions?

  • shiffman

    you can also put the jar file in a folder called “code” in the sketch itself for it to be accessible.

  • KesterR

    Also tried:

    C:UsersKesterDesktopDissertation1 sheep boidsboids3_2codejheatchart-0.6.jar

    Closed all Processing windows and re-opened.

    import jheatchart.*;

    import jheatchart-0.6.*;

    Sketch>Import library – not there

    Does JHeatChart just really not like me?! ;-)

  • KesterR

    More bizarrely, when I try the drag n drop method of importing a library, it says “Replace the existing version of jheatchart-0.6.jar?”.

    But it also says “No library found for jheatchart”! Which is it, Processing?!

    I just updated to Processing2.1.2 too, and tried again. No change.

    Thanks for your quick replies! Anything else I can try?

  • shiffman

    i don’t think you have the right import. it’s something like:

    import org.tc33.jheatchart.*;

    check the library’s documentation to be sure.

  • Soms

    I cant find a working download link for the simpleML library. Can any of you provide me one?
    Or is there any substitute for it since it is quite old already?

  • shiffman

    the library is deprecated, all of the functionality is now built into Processing 2 with loadStrings(), loadXML(), and thread().

  • Soms

    Thank you for your answer. I was hoping it will be something like this.


  • Suraj

    Hi. I am trying to import the Twitter4j library into processing.

    but there is no libraryName.jar.

    The library is not showing up in import->Library.


  • Bonnie

    Hello- thank you for all your tutorials!

    I have the following library inquiry: The library manager doesn’t let me load anything. Instead, he says “Error in contribution listing file on line 1″.

    This is odd because he started misbehaving out of the blue, when I tried to load the open processing for kinect. (I managed to load and test the SimpleOpenNI before hand)

    Would you have any ideas?

    Cheers, Bonnie

  • shiffman
  • Priya Pareek

    i could not import opencv library for processing from github…i followed all the steps but it doesn’t work!!!
    i also put the library in processing file i.e. processingmodesjavalibraries but with no luck!!
    i have downloaded opencv1.0.exe but i don’t know what to do with this(i mean how to import this in processing)???
    please help me…
    Thank you

  • ㅁㄴㅇㄹ