Install/upgrage Java 8 using Yum on EC2 instance (Amazon Linux AMI)

Step-1: Install Java

Runtime 1.8

sudo yum install java-1.8.0

if you need a java compiler and other developer tools:

sudo yum install java-1.8.0-openjdk-devel

Step-2: If you have multiple versions and one of those default , use the alternatives command as follows and enter the selection number as guided in the terminal.

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

Step-3: (Optional)

If you prefer you can remove Java 1.7

sudo yum remove java-1.8.0-openjdk

Note : Remove it after you installed Java 1.8 otherwise the aws-apitools will also be removed as they depend on Java to be installed


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s