Switch to java version-11 if any other version already exists update-alternatives --config java [root@ip-172-31-82-113 java-tomcat-maven-example]# update-alternatives ...