AMI Linux2‎ > ‎


Install Java Runtime 1.8

sudo yum install java-1.8.0
or if you need a java compiler and other developer tools:

sudo yum install java-1.8.0-openjdk-devel

Then use the alternatives command to make Java 1.8 the default.

sudo /usr/sbin/alternatives --config java
sudo /usr/sbin/alternatives --config javac

# etc
If you prefer you can remove Java 1.7 with

sudo yum remove java-1.7.0-openjdk
but remove it after you installed Java 1.8 or the aws-apitools will also be removed as they depend on Java on being installed.