Jump to content


Photo

HOW TO: Install Java and Processing 1.5


  • Please log in to reply
5 replies to this topic

#1 jim

jim

    Advanced Member

  • Administrators
  • 3,385 posts

Posted 13 February 2015 - 03:09 AM

Processing (http://processing.org/) is a great with to create visualizations. This tutorial describes how to install Processing 1.5 (and Java which it depends on) on the pcDuinio. There are 2 main steps: (1) installing Java, and (2) installing processing.

1. JAVA INSTALL

Download the EJRE from: http://www.oracle.co...vase/index.html

At command line run:
 

Code: [Select]

tar -zxvf ejre*.tar.gz 
chown -R root:root ./ejre1.7.0_10 
mkdir -p /usr/lib/jvm/
mv ejre1.7.0_10/ /usr/lib/jvm/

The EJRE still uses soft-flaot (armel) so we need to install the following using Apt:
 

Code: [Select]

sudo apt-get install -y libc6-armel libsfgcc1

The following armel version of the libraries seem not to be in Apt so go to each of the below links and download a .deb package:
 

And run the following to add the libraries to /lib/arm-linux-gnueabi/:
 

Code: [Select]

Then run: sudo dpkg --unpack --force-architecture lib*

Then add the following to your .bashrc file:
 

Code: [Select]

export JAVA_HOME=export JAVA_HOME=/usr/lib/jvm/ejre1.7.0_10
export PATH=$PATH:$JAVA_HOME/bin

2. PROCESSING 1.5 INSTALL

Download the EJRE from: http://processing.org/download/

In your home directory run:
 

Code: [Select]

tar -zxvf processing-1.5.1-linux.tgz
cd processing-1.5.1

The tools.jar files is not in the EJRE so copy it from Processing into the EJRE:
 

Code: [Select]

sudo cp java/lib/tools.jar /usr/lib/jvm/ejre1.7.0_10/lib/

Finally let Processing know were the EJRE is:
 

Code: [Select]

rm -rf java
ln -s /usr/lib/jvm/ejre1.7.0_10/ java

That should be it. Let me know if there are ways to improve this.



#2 jim

jim

    Advanced Member

  • Administrators
  • 3,385 posts

Posted 13 February 2015 - 03:09 AM

step one 2-4th command need a preceding sudo.  for last command in step one I assumed you meant /etc/bash.bashrc and near the top.  also below is a little js test.

http://www.quirksmod.../js/detect.html



#3 jim

jim

    Advanced Member

  • Administrators
  • 3,385 posts

Posted 13 February 2015 - 03:09 AM

actually after starting a different item.  the synaptic program reported that firefox and gnash were to be left unconfigured.  so i backed out this installation and everything reported being able to install correctly later.



#4 jim

jim

    Advanced Member

  • Administrators
  • 3,385 posts

Posted 13 February 2015 - 03:09 AM

An easier way is to: sudo apt-get install arduino

I beleive that will give you all the required packages you need for java and processing.



#5 jim

jim

    Advanced Member

  • Administrators
  • 3,385 posts

Posted 13 February 2015 - 03:10 AM

I followed all of the steps, but when I try to run Processing I get the following:
 

Code: [Select]

ubuntu@ubuntu:~/Downloads/processing-1.5.1$ ./processing
ubuntu@ubuntu:~/Downloads/processing-1.5.1$ Exception in thread "main" java.lang.ExceptionInInitializerError
Caused by: java.awt.HeadlessException
at sun.awt.HeadlessToolkit.getMenuShortcutKeyMask(HeadlessToolkit.java:237)
at processing.app.Base.<clinit>(Base.java:445)
any ideas what I did wrong?



#6 jim

jim

    Advanced Member

  • Administrators
  • 3,385 posts

Posted 13 February 2015 - 03:10 AM

When I downloaded Java, I downloadd the Headful version... I wonder if that makes a difference.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users