Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save frankmanzhu/cca8662874e1f1fdb971882dd2e71ac4 to your computer and use it in GitHub Desktop.
Save frankmanzhu/cca8662874e1f1fdb971882dd2e71ac4 to your computer and use it in GitHub Desktop.
java 8 in raspberry pi 3
Download Oracle jdk8
Log-in Raspberry Pi, enter the command to extract jdk-8-linux-arm-vfp-hflt.tar.gz to /opt directory.
$ sudo tar zxvf jdk-8-linux-arm-vfp-hflt.tar.gz -C /opt
Set default java and javac to the new installed jdk8.
$ 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
$ sudo update-alternatives --config javac
$ sudo update-alternatives --config java
After all, verify with the commands with -verion option.
$ java -version
$ javac -version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment