install latest version of java in ubuntu using terminal code example Example: install java ubuntu sudo apt install default-jre