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:; oraclelicense=accept-securebackup-cookie" ""  
 # 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  

No comments:

Post a Comment