Press Ctrl+Alt+T on the keyboard, or click the black box icon with a white ">_" on it on the left side of the screen. Type in sudo apt-get update && sudo apt-get upgrade -y and press ↵ Enter. This will refresh the package list and install all available updates for you. If asked for your user password, type it in and press ↵ Enter. Type in java -version and press ↵ Enter. If you see a line that says "The program 'java' can be found in the following packages" appear, Java is not installed on your computer. If Java is installed, you'll see a line that reports the current version of Java instead. Type sudo apt-get install default-jre into the command line, then press ↵ Enter. This will install Java on your Ubuntu computer in the default directory. If this doesn't work, try entering sudo apt-get install openjdk-8-jdk instead
افتح سطر الأوامر. أدخل أمر التحديث. أدخل كلمة مرورك إن طُلب منك ذلك. تأكد أن بيئة جافا غير مثبتة على جهازك بالفعل. اكتب أمر التثبيت.