2013-10-19

Install JDK 8 on Raspberry Pi

What you need:
  • Raspberry Pi (model B)
  • Raspbian installed
Install JDK 8:
  • Get Oracle JDK 8 (with JavaFX) for ARM from the Oracle download page: http://jdk8.java.net/download.html
    You need the Linux ARMv6/7 VFP, HardFP ABI version
  • Extract it to /opt/jdk1.8.0/ using:
    sudo tar zxvf jdk-8-ea-b*.tar.gz -C /opt
  • Setup Java
    sudo update-alternatives --install "/usr/bin/java" "java" "/opt/jdk1.8.0/bin/java" 1
    sudo update-alternatives --install "/usr/bin/javac" "javac" "/opt/jdk1.8.0/bin/javac" 1
If there is more than one java runtime installed check which version is used by output of:
java -version


If it is the wrong java runtime version, solve this by running:
sudo update-alternatives --config java
And choose the appropriate option.