Faka iJava JRE / JDK kwiLinux

Pin
Send
Share
Send

Izici zeJava ziyadingeka ukusebenzisa izinhlobo eziningi zezicelo kanye namawebhusayithi, ngakho-ke cishe wonke umsebenzisi wekhompyutha ubhekene nesidingo sokufaka le nkundla. Vele, ezinhlelweni zokusebenza ezahlukahlukene umgomo womsebenzi uhlukile, kepha ekusakazweni kweLinux kuhlale kufana, kepha singathanda ukusho ukuthi iJava ifakwa kanjani Ubuntu. Abanikazi beminye imihlangano bazodinga kuphela ukuphinda imiyalo enikezwe, kucatshangelwa syntax yesistimu.

Faka iJava JRE / JDK kwiLinux

Namuhla siphakamisa ukuthi uzijwayeze ngezinketho ezahlukene zokufaka imitapo yolwazi yeJava, ngoba wonke azoba wusizo kakhulu futhi asebenza ezimweni ezithile. Isibonelo, uma ungafuni ukusebenzisa amakhosombe avela eceleni noma uma ufuna ukubeka ama-Java ambalwa eduzane, kuzodingeka usebenzise inketho ehlukile. Kodwa-ke, ake sibhekisise bonke.

Okokuqala, kunconyelwa ukuthi kuhlolwe izibuyekezo zesitoreji sohlelo futhi uthole uhlobo lwamanje lweJava, uma lukhona, ku-OS. Konke lokhu kwenziwa ngekhonsoli ejwayelekile:

  1. Vula imenyu bese uqala "Isiginali".
  2. Faka umyaloukuvuselelwa kwesudo.
  3. Faka iphasiwedi kwi-akhawunti yakho ukuze uthole ukufinyelela kwezimpande.
  4. Ngemuva kokuthola amaphakheji, sebenzisa umyalojava -versionukubuka imininingwane efakiwe yeJava.
  5. Uma uthola isaziso esifana nalesi esingezansi, kusho ukuthi iJava ayitholakali ku-OS yakho.

Indlela yoku-1: Izikhumbuzo Ezisemthethweni

Indlela elula ukusebenzisa i-repository esemthethweni ukulanda i-Java, abayilayishe lapho. Udinga nje kuphela ukubhalisa imiyalo embalwa ukwengeza zonke izinto ezidingekayo.

  1. Gijima "Isiginali" bese ubhala laphosudo apt-get ukufaka okuzenzakalelayo-jdkbese uqhafaza Ngena.
  2. Qinisekisa ukulayishwa kwefayela.
  3. Manje engeza i-JRE ngokuthayipha umyalosudo apt-get ukufaka okuzenzakalelayo-jre.
  4. I-plugin yesiphequluli, engezwa ngesudo apt-get ufake icedtea-plugin.
  5. Uma unesifiso sokuthola imibhalo ephathelene nezinto ezingeziwe, zilande ngomyalosudo apt-get ukufaka okuzenzakalelayo-jdk-doc.

Yize le ndlela ilula impela, ayifanelekile ukufaka imitapo yolwazi yakamuva yeJava, ngoba ibingakabekwa endaweni yokugcina esemthethweni muva nje. Kungakho siphakamisa ukuthi uzijwayeze lezi zinketho zokufaka ezilandelayo.

Indlela Yesibili: I-Webupd8 Repository

Kukhona ikhosombe lomsebenzisi elibizwa ngeWebupd8, elinesikripthi esiqhathanisa inguqulo yamanje yeJava naleyo ese site yeOracle. Le ndlela yokufaka ilusizo kulabo abafuna ukufaka ukukhishwa okusha kwe-8 (okugcina kutholakala endaweni yokubeka yase-Oracle).

  1. Kwikhonsoli, fakai-sudo-add-apt-repository ppa: webupd8team / java.
  2. Qiniseka ukufaka iphasiwedi yakho.
  3. Qinisekisa ukungezwa kokusebenza ngokuchofoza Ngena.
  4. Lindela amafayela aqede ngaphandle kokuvala "Isiginali".
  5. Vuselela isitoreji sohlelo ngomyaloukuvuselelwa kwesudo.
  6. Manje kufanele wengeze ukufakwa kwesithombe ngokufakaI-sudo apt-get ukufaka i-oracle-java8-isifaki.
  7. Yamukela isivumelwano selayisense ukumisa iphakheji.
  8. Vuma ukungeza amafayela amasha ohlelweni.

Ekupheleni kwenqubo, kuzotholakala umyalo wokuthi ungafaka ngokuphelele noma yiluphi uhlobo -I-sudo apt-get ukufaka i-oracle-java7-isifakikuphi java7 - Uhlobo lweJava. Isibonelo, ungabekajava9nomajava11.

Iqembu lizosiza ukuqeda abagxeki abangafanele.sudo apt-get ukususa oracle-java8-Isifakikuphi java8 - Uhlobo lweJava.

Indlela 3: Thuthukisa Usebenzisa iWebupd8

Ngaphezulu, sikhulume ngokufaka imihlangano sisebenzisa ikhosombe lokunakekela leWebupd8. Ngenxa yesidalwa esifanayo, ungabuyekeza inguqulo yeJava ibe yamuva nje ngesikripthi sokuqhathanisa.

  1. Phinda izinyathelo ezinhlanu zokuqala emiyalweni edlule uma ungakazenzi lezi zinyathelo.
  2. Faka umyalosudo buyekeza-javabese uqhafaza Ngena.
  3. Sebenzisa umyalosudo apt-get ukufaka ukubuyekeza-javaukufaka izibuyekezo uma zitholakala.

Indlela 4: Ukufaka ngesandla

Mhlawumbe le ndlela inzima kakhulu kunaleyo esayihlolisisa kule ndatshana, kepha izokuvumela ukuthi uthole inguqulo edingekayo yeJava ngaphandle kokusebenzisa okubhalwe eceleni nezinye izinto ezengeziwe. Ukuze ufeze lo msebenzi, uzodinga noma yisiphi isiphequluli esikhona futhi "Isiginali".

  1. Nge-isiphequluli sewebhu, iya ekhasini elisemthethweni le-Oracle ukulanda i-Java, lapho uchofoza khona "Landa" noma khetha noma iyiphi enye inguqulo oyifunayo.
  2. Ngezansi kunamaphakheji athile anemitapo yolwazi. Sincoma ukulanda umlando wokugcina umlando tar.gz.
  3. Iya kufolda yokufaka kungobo yomlando, chofoza kuyo bese ukhetha "Izindawo".
  4. Khumbula indawo yephakeji, njengoba kuzodingeka uye kuyo ngokusebenzisa ikhonsoli.
  5. Gijima "Isiginali" futhi ugijime umyalocd / ikhaya / umsebenzisi / ifoldakuphi umsebenzisi - igama lomsebenzisi, futhi ifolda - Igama lefolda yesilondolozi sokugcina umlando.
  6. Dala ifolda ukuze uvule umlando. Imvamisa zonke izakhi zibekwa kwi-jvm. Ukwakha isiqondisi ngokungenasudo mkdir -p / usr / lib / jvm.
  7. Vula ingobo yomlando esele kufolda eyakhiwesudo tar -xf jdk-11.0.2_linux-x64_bin.tar.gz -C / usr / lib / jvmkuphi jdk-11.0.2_linux-x64_bin.tar.gz - Igama le-Archive.
  8. Ukwengeza izindlela zohlelo, uzodinga ukufaka imiyalo elandelayo ngokulandelana:

    izindlela zokuvuselela ze-sudo -install / usr / bin / java java /usr/lib/jvm/jdk1.8.0/bin/java 1
    izindlela zokuvuselela ze-sudo -install / usr / bin / javac javac /usr/lib/jvm/jdk1.8.0/bin/javac 1
    izindlela zokuvuselela ze-sudo -install / usr / bin / i-jaaws /usr/lib/jvm/jdk1.8.0/bin/javaws 1

    Enye yezindlela ezihlukile kungenzeka ukuthi ayikho, okuncike enguqulweni ekhethiwe yeJava.

  9. Kuhlala kuphela ukufeza ukucushwa kwendlela ngayinye. Okokuqala yenzaizindlela zokuvuselela ze-sudo --config java, thola inguqulo efanelekile yeJava, hlola inombolo yayo bese ubhala kukhonsoli.
  10. Phinda ngeizindlela zokuvuselela ze-sudo - ezinye ze -config.
  11. Ngemuva kwalokho lungiselela indlela yokugcinaizindlela zokuvuselela ze-sudo - ezinye ze -config.
  12. Hlola impumelelo yezinguquko ngokubona inguqulo esebenzayo yeJava (java -version).

Njengoba ukwazi ukubona, kunezindlela eziningi zokufaka iJava ohlelweni lokusebenza lwe-Linux, ngakho umsebenzisi ngamunye uzothola inketho efanelekile. Uma usebenzisa ikhithi ethile yokusabalalisa futhi izindlela ezingenhla zingasebenzi, funda ngokucophelela amaphutha akhonjiswe kukhonsoli bese usebenzisa imithombo esemthethweni ukuxazulula inkinga.

Pin
Send
Share
Send