Installing Processing in Ubuntu 12.04

Processing does not work with the default version of Java installed with Ubuntu (hrrr)
so you must install the one that does: the official Sun JDK 6 (or 7)

  1. Download the sun jdk 6 bin from here
  2. chmod +x jdk-6u32-linux-x64.bin
  3. ./jdk-6u32-linux-x64.bin
  4. sudo mv jdk1.6.0_32 /usr/lib/jvm/
  5. sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_32/bin/javac 1
    sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_32/bin/java 1
    sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.6.0_32/bin/javaws 1
  6. sudo update-alternatives --config javac
    sudo update-alternatives --config java
    sudo update-alternatives --config javaws
Now you can get processing
  1. wget http://processing.googlecode.com/files/processing-1.5.1-linux.tgz
  2. tar xzvf processing-1.5.1-linux.tgz
  3. cd processing-1.5.1
  4. ./processing

Resources

7 thoughts on “Installing Processing in Ubuntu 12.04”

  1. Hi Anonymouse 🙂

    If I remember well, Processing 2.x was not available when I wrote this post. I will updated this post when I try the new Processing version. Did you do it already? did it work fine?

    Thanks for the comments.

  2. A few months have passed. Was there a problem with Processing 2.x? Or just time?

    I want to run Processing on Ubunto and read from the Arduino, but I do not need to install the Arduino IDE. Will these instructions work for this situation? Or will I have to install the Arduino IDE to get the USB working?

    Thanks,
    Colin

  3. Hy,
    I ‘ve just followed this great simple tutorial.
    Imo, it needs an extra step :
    processing 1.5.1 at least for now comes with a version of the jdk (inside the processing-1.5.1/java directory) that IS NOT what we want to use, since we ‘ve just installed the sun/oracle JDK.
    so it needs to be removed before starting processing.

    here is how I would patch your final steps:

    1. wget http://processing.googlecode.com/files/processing-1.5.1-linux.tgz

    2. tar xzvf processing-1.5.1-linux.tgz

    3. rm -rf processing-1.5.1/java

    4. cd processing-1.5.1
    ./processing

    cheers and happy processing 🙂

    P.S. this patch solves the following error appearing in console:
    $ processing-1.5.1
    $ Exception in thread “main” java.lang.UnsatisfiedLinkError: (PATH-TO-processing-1.5.1/java/lib/i386/xawt/libmawt.so: libXtst.so.6: cannot open shared object file: No such file or directory
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1803)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1699)
    at java.lang.Runtime.load0(Runtime.java:770)
    at java.lang.System.load(System.java:1003)
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1803)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1720)
    at java.lang.Runtime.loadLibrary0(Runtime.java:823)
    at java.lang.System.loadLibrary(System.java:1028)
    at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:50)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.Toolkit.loadLibraries(Toolkit.java:1605)
    at java.awt.Toolkit.(Toolkit.java:1627)
    at processing.app.Base.(Base.java:445)
    Could not find the main class: processing.app.Base. Program will exit.
    $

  4. I tried the above patch by seb and I still get the “Could not find the main class:processing.app.Base. Program will exit.” error.

    Running Ubuntu 12.04 LTS, and had to use JDK 1.7.0_21 because 6u32 is out of date.

  5. As of 10/2013, Processing 1.5 is no longer supported.
    If you want to use Processing 2, simply download the tar from the official website, unpack it, change to that folder, type ./processing and it should work fine. No Java Version hustle …

Comments are closed.