Sunday, February 9, 2014

Java 8 release candidate is available (with steps to install on Raspberry Pi)

As announced in the post "Update on JDK 8 builds and release candidate status", the first release candidate build of JDK 8, b128 is available on https://jdk8.java.net/download.html. Including supported platform of Linux ARMv6/7 VFP, HardFP ABI, it can be run on Raspberry Pi. Here show the steps to install on Raspberry Pi.

In the steps shown here, visit https://jdk8.java.net/download.html on host PC, click to Accept License Agreement to get the actually download link of Linux ARMv6/7 VFP, HardFP ABI, it's http://www.java.net/download/jdk8/archive/b128/binaries/jdk-8-fcs-b128-linux-arm-vfp-hflt-31_jan_2014.tar.gz currently for Build b128.

JDK8 Download page
https://jdk8.java.net/download.html
Run on LXTerminal in Raspberry Pi:

  • Enter the command to downlaod the tar.gz with wget:
    wget --no-check-certificate http://www.java.net/download/jdk8/archive/b128/binaries/jdk-8-fcs-b128-linux-arm-vfp-hflt-31_jan_2014.tar.gz
  • Un-compress the downloaded tar.gz:
    sudo tar zxvf jdk-8-fcs-b128-linux-arm-vfp-hflt-31_jan_2014.tar.gz -C /opt
    The un-compressed jdk8 will be install in /opt/jdk1.8.0
  • To set the new JDK8 as default java and javac, enter the command:
    sudo update-alternatives --install /usr/bin/javac javac /opt/jdk1.8.0/bin/javac 1
    sudo update-alternatives --install /usr/bin/java java /opt/jdk1.8.0/bin/java 1

    Run the following commands to select jdk8 as default java:
    sudo update-alternatives --config javac
    sudo update-alternatives --config java
  • Now you can run the commands to verify default jdk version:
    $ java -version
    $ javac -version



After installed, you can create a test program to list System Properties to verify the installation.

No comments: