install jdk8 on Raspberry Pi and Archlinux

tar zxvf jdk-8-linux-arm-vfp-hflt.tar.gz -C /opt

Set default java and javac to the new installed jdk8:

 pacman -S java-environment-common java-runtime-common 
 ln -sf /opt/jdk1.8.0_06 /usr/lib/jvm/default 
 ln -sf /opt/jdk1.8.0_06/jre /usr/lib/jvm/default-runtime 
 java -version 
 javac -version