type command : update-alternatives –config java This will list all java versions. Type the number of desired version then type Enter to be selected check new version with command : java -verison