Ikani Java 8, 9 ndi 10 pa Ubuntu 18.04 ndi zotumphukira

logo ya Java

Java

Java mosakayikira ndi chilankhulo chamapulogalamu yomwe imagwiritsidwa ntchito pazinthu zosiyanasiyana ndipo ndichofunika kwambiri pothandizira ndi kugwiritsa ntchito zida zosiyanasiyana, Kukhazikitsa java ndichinthu chofunikira mukamaliza kukhazikitsa java.

Ndicho chifukwa chake nthawi ino ndikugawana nanu maphunziro osavuta amomwe mungakhalire Java m'dongosolo lathu ndi JDK yomwe ndi malo otukuka komanso malo ophera JRE.

Tili ndi njira ziwiri zowakhazikitsira kwa makina athu mmodzi wa iwo akugwiritsa ntchito maphukusi omwe amatipatsa kuchokera kumalo osungira Ubuntu ndipo inayo ndi kudzera eKugwiritsa ntchito malo osungira ena.

Momwe mungayikitsire Java pa Ubuntu 18.04 kuchokera posungira?

Kukhazikitsa Java ndi mapulagini ake Titha kuzichita podzithandiza ndi Synaptic kapena kuchokera ku terminal.

Ndi Synaptic timangogwiritsa ntchito makina osakira kuti tisankhe maphukusi omwe tikufuna kukhazikitsa.

Pomwe, tili ndi terminal, tiyenera kutsegula ndikutsatira malamulo awa.

Nkhani yowonjezera:
Ubuntu 18.04 LTS Bionic Beaver Kukhazikitsa Guide

Choyamba tiyenera kusintha makinawa ndi:

sudo apt-get update

sudo apt-get upgrade

Ndipo potsiriza timayika Java ndi lamuloli:

sudo apt-get install default-jdk

Pamene kukhazikitsa malo ophera omwe timachita:

sudo apt-get install default-jre

Para onetsetsani kuti tili ndi Java m'dongosolo lathu timangofunika kuchita:

java --version

Zomwe zidzabweretse yankho ndikosintha kwathu java.

Momwe mungayikitsire njira zaulere za Java pa Ubuntu 18.04?

Ndikofunikanso kudziwa izi tili ndi njira zina zaulere ku Java zomwe titha kukhazikitsa mwachindunji kuchokera ku malo ovomerezeka a Ubuntu.

Ubuntu wokhala ndi buku lotseguka Zolemba za Java panthawi yothamanga wotchedwa Open JDK.

Kuyika Ubuntu Java Open JDK Mtundu wa 11 tiyenera kutsegula terminal ndikukhazikitsa:

sudo apt install openjdk-11-jdk

Kuyika Ubuntu Java Open JDK mtundu 9 run:

sudo apt install openjdk-9-jdk

Ndipo pa Java Open JDK 8 run:

sudo apt install openjdk-8-jdk

OpenJDK

Momwe mungayikitsire Java pa Ubuntu 18.04 kuchokera ku PPA?

Njira ina yomwe yatchulidwa inali kudzera mwa PPA wachitatu, kukhazikitsa Java pakompyuta yathu tidzagwiritsa ntchito chosungira kuti anyamata pa webupd8team atipatse ife.

Kwa ichi Tiyenera kutsegula ma terminal ndikutsatira lamulo lotsatira:

sudo add-apt-repository ppa:webupd8team/java

sudo apt update

Apa ndiyenera kufotokoza izi m'malo awa ali ndi mtundu wa 8 ndi 9 wa java kotero mudzasankha mtundu womwe mukufuna kukhazikitsa.

Kukhazikitsa Java mtundu 8 run:

sudo apt install oracle-java8-installer

Para Mlandu wa Java 9 timachita:

sudo apt install oracle-java9-installer

Momwe mungayikitsire Java 10 pa Ubuntu 18.04 ndi zotumphukira?

Popeza ali ndi mtundu wachisanu ndi chinayi wa Java m'malo akale, Tiyenera kugwiritsa ntchito chosungira china ngati tikufuna kukhazikitsa java 10 m'magulu athu.

Mtunduwu wakhalako kwakanthawi kwakanthawi ndipo umabweretsa zotsatirazi:

  • chosakanizira chongoyerekeza mu nthawi chotchedwa Graal chitha kugwiritsidwa ntchito papulatifomu ya Linux / x64
  • mtundu wosiyanasiyana wamomwe mungasinthire.
  • adagawana nawo pulogalamu yama data, yomwe imalola kuti makalasi agwiritsidwe ntchito aikidwe mu fayilo yogawana kuti muchepetse kuyambika ndi zotsalira za mapulogalamu a Java.
  • Kudziwitsa za Docker: Pa Linux, JVM tsopano imazindikira yokha ngati ikuyenda mu chidebe cha Docker

Kuti muchite izi pa terminal timapereka lamuloli kuti tiwonjezere pamndandanda wathu wazosungira:

sudo add-apt-repository ppa:linuxuprising/java

Timasintha nkhokwe zathu ndi:

sudo apt update

Ndipo potsiriza timayika ndi lamuloli:

sudo apt install oracle-java10-installer

 Kusintha makonda a Java

Java imatilola kukhala ndi mitundu yosiyanasiyana yoyikidwayo, yomwe titha kusankha mtundu womwe tingagwiritse ntchito popanda kufunika kokhazikitsanso mtundu wakale osachotsa wakale.

Pogwiritsa ntchito zosintha zina

Titha kupanga kasinthidwe kamene kamatilola kusamalira maulalo ophiphiritsira omwe angagwiritsidwe ntchito pamalamulo osiyanasiyana.

sudo update-alternatives --config java

Iwonetsanso mitundu yosiyanasiyana ya Java yomwe tidayika, yomwe titha kuyika kapena kusintha mtundu wosasintha mwa kusankha womwe tifuna.


Zomwe zili m'nkhaniyi zikutsatira mfundo zathu za malamulo okonzekera. Kuti mufotokoze cholakwika dinani Apa.

Ndemanga za 8, siyani anu

Siyani ndemanga yanu

Anu email sati lofalitsidwa.

*

*

  1. Wotsogolera pazosankhazi: Miguel Ángel Gatón
  2. Cholinga cha deta: Control SPAM, kasamalidwe ka ndemanga.
  3. Kukhazikitsa: Kuvomereza kwanu
  4. Kulumikizana kwa zomwe zafotokozedwazo: Zomwezo siziziwululidwa kwa anthu ena kupatula pakukakamizidwa mwalamulo.
  5. Zosunga: Zosungidwa ndi Occentus Networks (EU)
  6. Ufulu: Nthawi iliyonse mutha kuchepetsa, kuchira ndikuchotsa zidziwitso zanu.

  1.   Pa mawilo anati

    Moni potengera «sudo zosintha-njira zina -config java», pazifukwa zogwirizana ndakhazikitsa mitundu iwiri ya Java, 11 mwachisawawa ndi 8 (Buku) yogwirizana ndi ntchito zakale za ubuntu:
    Mkhalidwe Wosankha Njira
    --------------------
    * 0 / usr / lib / jvm / java-11-openjdk-amd64 / bin / java 1101 zodziwikiratu
    1 / usr / lib / jvm / java-11-openjdk-amd64 / bin / java 1101 njira yoyambira
    2 / usr / lib / jvm / java-8-openjdk-amd64 / jre / bin / java 1081 njira yoyambira

    Ndingathetse bwanji magwiridwe antchito ndi java8, kuti nditha kugwiritsa ntchito mtundu wa 8 osakhazikitsa mtundu wa 11?

    Java old_app_name -> sakugwira ntchito
    / usr / lib / jvm / java-8-openjdk-amd64 / jre / bin / java old_app_name -> osagwira ntchito

    Zikomo, moni David.

  2.   sanchez53 anati

    * siya linck kuti zikhale zosavuta *

  3.   jonathan anati

    Sindingathe kukhazikitsa java 8, ndani akudziwa? pa ubuntu 18.04.1 lts

    1.    alireza anati

      moni, kodi mungathe kukhazikitsa java 8 pa ubuntu 18.04.1 lts ngati ndi choncho, ndiyankheni monga zikomo

  4.   paul anati

    Sindingathe kukhazikitsa java 8 pamakina anga a 18.04 lts mwina

  5.   xavi anati

    Zikomo kwambiri!

  6.   Atsogoleri anati

    Anthu, ndine yotulutsira, ngati simukudziwa kanthu, yendani panjira yanga, ndikhoza kukuwuzani zinthu zambiri zokhudza ubuntu.
    Zikomo!

  7.   DIOGO anati

    tsambali ndilabwino

bool (zoona)