- Download jdk-8u77-linux-arm64-vfp-hflt.tar.gz from Oracle
- Extract the downloaded file to /opt
$ sudo tar zxvf jdk-8u77-linux-arm64-vfp-hflt.tar.gz -C /opt - Set default java and javac to the extracted JDK 8
$ sudo update-alternatives --install /usr/bin/javac javac /opt/jdk1.8.0_77/bin/javac 1
$ sudo update-alternatives --install /usr/bin/java java /opt/jdk1.8.0_77/bin/java 1 - If you already installed the other JDK like openjdk, update the configuration
$ sudo update-alternatives --config javac
$ sudo update-alternatives --config java - Check the commands
$ java -version
$ javac -version - This is a sample code of Sample.java
public class Sample { public static void main(String[] args) { System.out.println("Java world on PINE64!!"); } }
- Compile the code and run
$ javac Sample.java
$ java Sample
4/22/2016
PINE64: install Oracle JDK 8
This post show how to install Oracle JDK 8 on PINE64.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment