Pages

Install JDK1.8 in AWS Linux

Steps to install oracle JDK 1.8 in Amazon Linux

 #Download JDK1.8.0_45  
 wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u45-b14/jdk-8u45-linux-x64.rpm"  
 # Install Java  
 sudo rpm -i jdk-8u45-linux-x64.rpm  
 # Check if the default java version is set to oracle jdk  
 java -version  
 # If not then lets create one more alternative for Java for Sun JDK  
 sudo /usr/sbin/alternatives --install /usr/bin/java java /usr/java/jdk1.8.0_45/bin/java 20000  
 # Set the SUN JDK as the default java  
 sudo /usr/sbin/alternatives --config java  
 #Then check java version  
 java -version