Sanya Java JRE / JDK akan Linux

Pin
Send
Share
Send

Ana buƙatar abubuwan haɗin Java don gudanar da aikace-aikacen aikace-aikace da yanar gizo masu yawa, don haka kusan kowane mai amfani da kwamfuta yana fuskantar buƙatar shigar da wannan dandamali. Tabbas, a cikin tsarin aiki daban-daban tsarin aikin yana da bambanci, amma ga rarrabuwa na Linux koyaushe kusan ɗaya ne, amma muna son gaya yadda aka sanya Java a cikin Ubuntu. Masu mallakan sauran majalisun kawai zasu buƙaci maimaita umarnin da aka bayar, la'akari da lafazin tsarin.

Sanya Java JRE / JDK akan Linux

A yau muna ba da shawarar ku san kanku tare da zaɓuɓɓuka daban-daban don shigar da ɗakunan karatu na Java, tunda duk zasu kasance mafi amfani kuma suna aiki a wasu yanayi. Misali, idan bakaso kayi amfani da bayanga na uku ko kuma kana son sanya Java da yawa kusa, to kana bukatar amfani da wani zabi daban. Koyaya, bari mu bincika dukkan su.

Da farko, ana bada shawara don bincika sabuntawar ajiya tsarin kuma gano fasalin Java na yanzu, idan akwai, a cikin OS. Dukkan waɗannan ana yin su ta hanyar daidaitaccen wasan bidiyo:

  1. Bude menu kuma ka gudu "Terminal".
  2. Shigar da umarninsudo dace-samu sabuntawa.
  3. Shigar da kalmar wucewa daga asusunka don samun tushen tushe.
  4. Bayan karɓar kwantena, yi amfani da umarninjava-bayadon duba bayanin Java da aka sanya.
  5. Idan ka karɓi sanarwa mai kama da wanda ke ƙasa, wannan yana nuna cewa Java ba a cikin OS ɗinku.

Hanyar 1: Manyan Ma'aikata

Hanya mafi sauki ita ce amfani da kayan ajiyar don sauke Java, wanda masu haɓakawa suka buga a can. Abin sani kawai kuna buƙatar yin rijistar 'yan umarni don ƙara duk abubuwan da suka zama dole.

  1. Gudu "Terminal" kuma rubuta a cansudo dace-samu shigar tsoho-jdksannan kuma danna Shigar.
  2. Tabbatar da shigar da fayil ɗin.
  3. Yanzu ƙara JRE ta hanyar buga umarnisudo dace-samu shigar tsoho-jre.
  4. Mai binciken mai bincike, wanda aka kara ta hanyarsudo dace-samu kafa icedtea-plugin.
  5. Idan kuna sha'awar samun takardu game da abubuwan da aka haɗa, ku saukar da su da umarninsudo dace-samu shigar tsoho-jdk-doc.

Kodayake wannan hanyar tana da sauƙi, bai dace da sanya sabbin ɗakunan karatu na Java ba, tunda ba a shimfiɗa su ba a cikin shaidun hukuma kwanan nan. Abin da ya sa muke ba da shawara cewa ku fahimci kanku da zaɓuɓɓukan shigarwa masu zuwa.

Hanyar 2: Shafin Yanar gizo

Akwai wurin ajiyar mai amfani wanda ake kira Webupd8, wanda ke da rubutun da yake kwatanta nau'in Java na yanzu da wanda yake kan shafin Oracle. Wannan hanyar shigarwa tana da amfani ga waɗanda suke so su shigar da sabon sakin 8 (na ƙarshe a cikin wurin ajiyar Oracle).

  1. A cikin na'ura wasan bidiyo, shigar dasudo add-apt-mangaza ppa: webupd8team / java.
  2. Tabbatar hada kalmarka ta sirri.
  3. Tabbatar da ƙara aikin ta danna kan Shigar.
  4. Jira fayiloli don kammalawa ba tare da rufewa ba "Terminal".
  5. Sabunta ajiya na tsarin tare da umarnisudo dace-samu sabuntawa.
  6. Yanzu yakamata ku ƙara mai saka hoto ta hanyar shigarsudo mai dace-samu shigar Oracle-java8-installer.
  7. Yarda da lasisin lasisin don daidaita kunshin.
  8. Yarda da don ƙara sabon fayiloli a cikin tsarin.

A karshen aiwatarwa, umarni zai same ku don shigar da kowane irin siga -sudo mai dace-samu shigar Oracle-java7-installerina java7 - Sigar Java. Misali, zaka iya yin wasiyyajava9kojava11.

Willungiyar zata taimaka wajen kawar da rashin shigarwar da bata dace ba.sudo mai dacewa-yana cire oracle-java8-installerina java8 - Sigar Java.

Hanyar 3: Haɓaka Amfani da Yanar Gizo

A sama, munyi magana game da shigar da majalisai ta amfani da gidan ajiyar gidan yanar sadarwar al'ada. Godiya ga wannan ma'auni guda ɗaya, zaku iya sabunta fasalin Java zuwa sabon wanda kawai ta hanyar rubutun kwatancen.

  1. Maimaita matakai biyar na farko daga umarnin da suka gabata idan baku riga kun aikata waɗannan matakan ba.
  2. Shigar da umarninsudo update-javasannan kuma danna Shigar.
  3. Yi amfani da umarnisudo dace-samu shigar sabunta-javadon shigar da ɗaukakawa idan an samo su.

Hanyar 4: Shigarwa na Manual

Wataƙila wannan hanyar ita ce mafi wahalar waɗanda muka bincika a cikin wannan labarin, amma zai ba ku damar samun nau'in kayan Java ɗin da ya cancanta ba tare da amfani da alamomin ɓangare na uku da sauran abubuwan haɗin gwiwa ba. Don cim ma wannan aikin, kuna buƙatar duk wata mai bincike da "Terminal".

  1. Ta hanyar binciken yanar gizo, jeka shafin Oracle na zazzage Java, inda ka latsa "Zazzagewa" ko zaɓi kowane sigar da kake buƙata.
  2. Da ke ƙasa akwai wasu kunshin tare da ɗakunan karatu. Mun bada shawara zazzage kayan tarihi tar.gz.
  3. Je zuwa babban fayil na kayan tarihin, danna kan shi kuma zaɓi "Bayanai".
  4. Tuna wurin da kunshin yake, tunda zaku shiga ta ta na'ura wasan bidiyo.
  5. Gudu "Terminal" da gudu umarnicd / gida / mai amfani / babban fayilina mai amfani - sunan mai amfani, da babban fayil - sunan babban gidan ajiyar kayan adana kayan tarihin.
  6. Airƙiri babban fayil don buɗe ɗakin ajiya. Yawancin lokaci ana sanya dukkan abubuwan cikin jvm. Irƙirar directory ta shigasudo mkdir -p / usr / lib / jvm.
  7. Cire babban fayil ɗin da ke cikin fayil ɗin da aka ƙirƙirasudo tar -xf jdk-11.0.2_linux-x64_bin.tar.gz -C / usr / lib / jvmina jdk-11.0.2_linux-x64_bin.tar.gz - sunan kayan tarihin.
  8. Don ƙara hanyoyin hanyoyin, kuna buƙatar shigar da waɗannan umarni masu ɗorewa:

    abubuwa masu amfani da kayan juji na zamani - saiti / usr / bin / java java /usr/lib/jvm/jdk1.8.0/bin/java 1
    kayan aikin sudo sabuwa-sauƙaƙa - sakawa / usr / bin / javac javac /usr/lib/jvm/jdk1.8.0/bin/javac 1
    kayan aikin sudo sabuwa-sauƙaƙa - saiti / usr / bin / javaws javaws /usr/lib/jvm/jdk1.8.0/bin/javaws 1

    Ofaya daga cikin hanyoyi masu maye gurbin bazai wanzu ba, wanda ya dogara da zaɓaɓɓen nau'in Java.

  9. Ya rage kawai don aiwatar da tsarin kowane hanya. Da farko yisudo update-madadin --config java, nemo samfurin da ya dace na Java, bincika lambarta kuma rubuta a cikin na'ura wasan bidiyo
  10. Maimaita tare dasudo update-madadin --config javac.
  11. Sannan saita hanyar karshe tasudo update-madadin --config javaws.
  12. Duba nasarar canje-canjen ta hanyar sanin fasalin Java ɗin (java-baya).

Kamar yadda kake gani, akwai hanyoyi masu yawa don shigar Java a cikin tsarin aiki na Linux, saboda haka kowane mai amfani zai sami zaɓi da ya dace. Idan kayi amfani da takamaiman kayan rarraba kuma hanyoyin da ke sama ba suyi aiki ba, a hankali bincika kurakuran da aka nuna a cikin naúbu kuma yi amfani da hanyoyin hukuma don magance matsalar.

Pin
Send
Share
Send