Installing Oracle JDK on AWS EC2 Ubuntu instance
1 min readJan 2, 2020
If you are tired of trying with package managers as me, try these steps.
1)Download the needed JDK version from this.
2) Scp into the remote host.
scp Downloads/jdk-8u131-linux-x64.tar.gz nuwan@35.192.113.33:~
3) Unzip to /usr/lib/jvm
sudo tar zxvf jdk-8u131-linux-x64.tar.gz -C /usr/lib/jvm
4) Update the system
sudo update-alternatives — install “/usr/bin/java” “java” “/usr/lib/jvm/jdk1.8.0_131/bin/java” 1
5) Change the default java
sudo update-alternatives — config java
6) Check java
java -version
Happy coding :-)