Yadda za a shigar da manzon Telegram a kan iPhone

Ana buƙatar kayan aikin Java don gudanar da aikace-aikace iri-iri da yanar gizo, don haka kusan kowane mai amfani da kwamfuta yana fuskantar buƙatar shigar da wannan dandamali. Tabbas, ka'idodin yin ɗawainiyar ya bambanta a cikin tsarin aiki daban-daban, amma tare da rabawa Linux yana da yawa game da wannan, kuma muna so mu fada yadda aka shigar da Java a Ubuntu. Masu mallakan sauran majalisai zasu buƙatar maimaita umarnin da aka ba, la'akari da haɗin tsarin.

Shigar da Java JRE / JDK a cikin Linux

A yau muna ba da damar fahimtar daban-daban hanyoyin shigarwa don ɗakunan karatu na Java, tun da yake dukansu zasu fi dacewa da kuma dacewa a wasu yanayi. Alal misali, idan ba ku so ku yi amfani da wuraren ajiyar wasu, ko kuma idan kuna so ku sanya gefen Java da dama, to, kuna buƙatar amfani da zaɓi na daban. Duk da haka, bari mu dubi su duka.

Da farko, an bada shawara don bincika samfurori na tsabtatawar tsarin kuma gano halin yanzu na Java, idan yana cikin OS a kowane. Anyi wannan ne ta hanyar na'ura mai kwalliya:

  1. Bude menu kuma gudu "Ƙaddara".
  2. Shigar da tawagarsudo apt-samun sabuntawa.
  3. Shigar da kalmar sirri ta asusunka don samun damar shiga.
  4. Bayan karbar kunshin, amfani da umurninjava -versiondon duba bayani game da java shigarwa.
  5. Idan ka karɓi sanarwar irin wannan da ke ƙasa, to, Java ba a cikin OS naka ba.

Hanyar 1: Gidajen Jami'an Tsaro

Hanyar da ta fi dacewa ita ce yin amfani da asusun ajiyar hukuma don sauke Java, wanda masu saukewa suka sauke a can. Ana buƙatar yin rajistar wasu umarnin don ƙara dukkan abubuwan da aka dace.

  1. Gudun "Ƙaddara" kuma rubuta a cansudo apt-samun shigar default-jdksa'an nan kuma danna kan Shigar.
  2. Tabbatar da kariyar fayiloli.
  3. Yanzu ƙara JRE ta bugaSudo apt-samun shigar tsoho-jre.
  4. Mai bincike na plugin wanda aka ƙara viasudo apt-samun shigar icedtea-plugin.
  5. Idan kuna sha'awar samun takardun tare da kula da abubuwan da aka haɓaka, sauke su da umurninsudo apt-samun shigar default-jdk-doc.

Ko da yake wannan hanya ta zama mai sauƙi, ba dace da shigar da ɗakunan karatu na freshest na Java ba, tun da ba a dage su ba a cikin asusun ajiyar kwanan nan kwanan nan. Abin da ya sa muke ba da damar fahimtar wadannan zaɓuɓɓukan shigarwa.

Hanyar 2: Ajiyayyen yanar gizo

Akwai wurin ajiya na al'ada da ake kira Webupd8, wanda akwai rubutun da ke kwatanta halin yanzu Java tare da wanda aka samo akan shafin yanar gizo Oracle. Wannan hanyar shigarwa yana da amfani ga waɗanda suke so su shigar da sabon launi 8 (sabon samuwa a cikin madogaran Oracle).

  1. A cikin na'ura wasan bidiyo, shigarSudo add-apt-repository ppa: webupd8team / java.
  2. Tabbatar shigar da kalmar sirri naka.
  3. Tabbatar da ƙara aiki ta danna kan Shigar.
  4. Jira fayil don sauke ba tare da rufewa ba "Ƙaddara".
  5. Ɗaukaka tsarin tsarin tare da umurninsudo apt-samun sabuntawa.
  6. Yanzu ƙara mai sakawa zane ta bugasudo apt-samun shigar oracle-java8-mai sakawa.
  7. Karɓi yarjejeniyar lasisi don tsara tsarin.
  8. Yi imani don ƙara sabon fayiloli zuwa tsarin.

A ƙarshen tsari, za ku sami damar zuwa ga tawagar don shigar da kowane sashi -sudo apt-samun shigar oracle-java7-mai sakawainda java7 - Java version. Alal misali, za ka iya rajistarjava9kojava11.

Umurnin zai taimaka wajen kawar da wadanda ba su dace ba.sudo apt-samun cire oracle-java8-mai sakawainda java8 - Java version.

Hanyar 3: Sabunta tare da Webupd8

A sama, mun yi magana game da shigar da majalisai ta amfani da tsararren al'ada na Webupd8. Mun gode wa madadin mahimmanci, za ka iya sabunta sabbin sigar Java zuwa sabon zamani kawai ta hanyar rubutun kwatanta.

  1. Maimaita matakai biyar na farko daga umarnin da suka gabata, idan ba a riga ka aikata wadannan matakai ba.
  2. Shigar da tawagarsudo update-javasa'an nan kuma danna kan Shigar.
  3. Yi amfani da umurninsudo apt-samun shigar update-javadon shigar da ɗaukaka idan an samo su.

Hanyar 4: Shigarwa da Aikatawa

Wataƙila wannan hanya ita ce mafi wuya ga waɗanda muka tattauna a wannan labarin, amma zai samar da takaddun Java ɗin ba tare da yin amfani da kayan ajiyar ɓangare na uku ba da sauran abubuwan da aka gyara. Don cika wannan aiki za ku buƙaci duk wani burauzar mai samuwa da kuma "Ƙaddara".

  1. Ta hanyar burauzar yanar gizo, je zuwa shafin Oracle na sirri don sauke Java, inda danna kan Saukewa ko zaɓi duk wani buƙatar da ake bukata.
  2. Da ke ƙasa akwai kunshe da yawa tare da ɗakin karatu. Muna bada shawara akan sauke fayil ɗin. tar.gz.
  3. Nuna zuwa babban fayil tare da tarihin, danna kan RMB kuma zaɓi "Properties".
  4. Ka tuna da wurin da kunshin, saboda dole ne ka je ta ta hanyar kwakwalwa.
  5. Gudun "Ƙaddara" da kuma aiwatar da umurnincd / gida / mai amfani / fayilinda mai amfani - sunan mai amfani, da kuma babban fayil - sunan babban fayil ajiyar ajiya.
  6. Ƙirƙiri babban fayil don kaddamar da tarihin. Yawancin lokaci an sanya dukkan kayan aikin a jvm. Ana yin jagora ta hanyar bugawasudo mkdir -p / usr / lib / jvm.
  7. Kashe tarihin data kasance a cikin babban fayil ɗin da aka halittasudo tar -xf jdk-11.0.2_linux-x64_bin.tar.gz -C / usr / lib / jvminda jdk-11.0.2_linux-x64_bin.tar.gz - Sunan fayil.
  8. Don ƙara hanyoyin hanyoyi, kana buƙatar shigar da waɗannan umarni da sauri:

    sudo sabuntawa-zabi --install / usr / bin / java java /usr/lib/jvm/jdk1.8.0/bin/java 1
    sudo sabunta-zabi --install / usr / bin / javac javac /usr/lib/jvm/jdk1.8.0/bin/javac 1
    sudo sabunta-zabi --install / usr / bin / javaws javaws /usr/lib/jvm/jdk1.8.0/bin/javaws 1

    Ɗaya daga cikin hanyoyi madaidaiciya bazai kasance ba, dangane da ɓangaren Java ɗin da ka zaɓa.

  9. Ya rage kawai don saita kowace hanya. Na farko gudusudo sabunta-zabi --config java, sami samfurin da ya dace da Java, tabbatar da lambarsa kuma shigar da na'ura.
  10. Maimaita wannan aikin tare dasudo sabuntawa-zabi --config javac.
  11. Sa'an nan kuma saita hanyar karshe ta hanyarsudo sabunta-zabi --config javaws.
  12. Bincika nasarar nasarar canje-canjen ta gano fitar da aikin Java (java -version).

Kamar yadda kake gani, akwai hanyoyi da yawa don shigar da Java zuwa cikin tsarin tsarin Linux, saboda haka kowane mai amfani zai sami wani zaɓi mai dacewa. Idan kayi amfani da takamaiman rarraba da kuma hanyoyin da aka ba ba su aiki ba, duba da kurakurai da kurakurai da kuma yin amfani da hanyoyin da za a magance matsalar.