Monday, June 2, 2014

Installing the Java 8 Embedded JRE on the pcDuino 2

Download the Java 8 embedded JRE from http://www.oracle.com/technetwork/java/embedded/downloads/javase/.  I usually download files to my desktop computer and then use SCP to copy the files to my pcDuino, though you can, of course, download directly to the pcDuino if you have a screen, keyboard, and mouse set up.

1. Check the "Accept" box in the section OTN LICENSE AGREEMENT

2. Scroll down to the section ORACLE JAVA SE EMBEDDED VERSION 8.  For the pcDuino, download "ARMv7 Linux - VFP, HardFP ABI, Little Endian." The name on the download link is ejdk-8-fcs-b132-linux-arm-vfp-hflt-03_mar_2014.tar.gz.

3. Use gunzip and tar to extract the installation files.

4. Set the JAVA_HOME environment variable to point to the JRE in the directory tree just extracted.  In my case, this is what I used.  Change the path to match where you extracted the files on your pcDuino.


    export JAVA_HOME=/media/BBerkland2/ejdk1.8.0/linux_arm_vfp_hflt/jre/

 5.  Now run the jrecreate.sh script.  I used the following command to install all aspects of the JRE.  See this document for configuration options.  Again, update that path to jrecreate.sh to match your circumstances.  The destination directory for installation (--dest) should not already exist.  

  /media/BBerkland2/ejdk1.8.0/bin/jrecreate.sh --dest /media/BBerkland2/Java8/

The installation process may take 10 - 15 minutes, and there isn't any indication of progress.  Just let it run.  When you see the command prompt, the installation is complete.

Update your .bashrc file to update your path and permanently export the JAVA_HOME environment variable.  

You can quickly confirm that all is well by running java -version. 

Note that there is no Java 8 compiler (javac) for the pcDuino, so you will need to do development work on another machine.

No comments:

Post a Comment