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)
- Download the sun jdk 6 bin from here
-
chmod +x jdk-6u32-linux-x64.bin
-
./jdk-6u32-linux-x64.bin
-
sudo mv jdk1.6.0_32 /usr/lib/jvm/
-
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
-
sudo update-alternatives --config javac sudo update-alternatives --config java sudo update-alternatives --config javaws
Now you can get processing
- wget http://processing.googlecode.com/files/processing-1.5.1-linux.tgz
-
tar xzvf processing-1.5.1-linux.tgz
- cd processing-1.5.1
- ./processing
Resources
Hi!
Thanks for this wonderful post. I’d like to collaborate whit a couple things:
1. Getting Java6 from a PPA : http://www.webupd8.org/2012/11/oracle-sun-java-6-installer-available.html
2. I understand that we need Oracle Java 6, but why Processing 1.5 and not Processing 2.x? Because compability with arduino or just because it is the stable version?
Regards!
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.
Would this also work with Mint?
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
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.
$
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.
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 …