ITEAD Studio asked me how to install Processing 2.1.1 on Debian 7.0 running on the IBOX, because they want to use the IBOX as a Lampduino controller. This article describes the installation procedure. All of the commands must be typed into a shell Terminal.
1. Install openjdk and librxtx
# apt-get update
# apt-get install openjdk-7-jdk librxtx-java
2. Download and extract Processing for 32-bit Linux
# cd /opt
# wget http://download.processing.org/processing-2.1.1-linux32.tgz
# tar xzf processing-2.1.1-linux32.tgz
3. Remove the x86 Java bundled with Processing and link to OpenJDK
# cd processing-2.1.1
# rm -rf java
# ln -s /usr/lib/jvm/java-7-openjdk-armhf java
4. Modify the serial support for ARM
Unfortunately, Processing 2.1.1 no longer uses RXTXcomm.jar, so we have to copy the serial support from Processing 2.0.3, and then modify it for ARM:
# cd /opt
# wget http://download.processing.org/processing-2.0.3-linux32.tgz
# tar xzf processing-2.0.3-linux32.tgz
# rm -rf processing-2.1.1/modes/java/libraries/serial
# mv processing-2.0.3/modes/java/libraries/serial processing-2.1.1/modes/java/libraries
# rm -rf processing-2.0.3*
# cd processing-2.1.1/modes/java/libraries/serial/library
# rm RXTXcomm.jar
# cp /usr/share/java/RXTXcomm.jar .
# rm linux32/librxtxSerial.so
# cp /usr/lib/jni/librxtxSerial.so linux32
Congratulalions, you have a working copy of Processing! Start Processing by launching /opt/processing-2.1.1/processing
** Optional Steps Below **
Processing complains that it doesn’t like OpenJDK when it’s launched. If you want to accelerate the performance, and improve compatibility, you can follow the additional steps below and install the hard float version of Oracle Java 7 SE Embedded. The OpenJDK 7 that’s installed via apt-get ignores the A20’s hardware floating point unit, and instead uses software emulation.
5. Download Java SE Embedded 7 update 51
Unfortunately, Oracle makes you accept a license agreement, which requires cookies, making download a lot messier than just running wget.
Use a web browser to navigate to the Java SE Embedded Downloads page. Click the Accept License Agreement radio button near the top of the page, and then click the link corresponding to ARMv6/7 Linux – Headful EABI, VFP, HardFP ABI, Little Endian. The next page requires you to log into an Oracle account. If you don’t have one, you can create one for free. Save the file the /opt directory. The included web browser wasn’t working in my copy of ITEAD Debian 7.0. If you need a web browser to download Java, you can use iceweasel:
# apt-get install iceweasel
6. Install Oracle Java SE Embedded 7
# cd /opt
# tar xzf ejre-7u51-fcs-b13-linux-arm-vfp-hflt-client_headful-18_dec_2013.gz
The .gz file will extract into a directory at /opt/ejre1.7.0_51.
7. Modify Processing to use Oracle Java SE Embedded 7
# ln -s /opt/ejre1.7.0_51 /opt/processing-2.1.1/java
When you launch Processing 2.1.1, it should no longer complain that it doesn’t like the version of Java that you’re using. I found that the hardware floating support Oracle Java 7 gives a big speedup in any code that has floating point computations.
Previous Article: ITEAD Studio IBOX – Part 2: Booting up Debian Linux 7.0