Kenya Java JRE / JDK ho Linux

Pin
Send
Share
Send

Ho hlokahala likarolo tsa Java ho tsamaisa lits'ebetso tse ngata tse fapaneng le liwebsaete, ka hona, hoo e batlang e le mosebelisi e mong le e mong oa khomphutha o shebane le tlhoko ea ho kenya sethala sena. Ho joalo, litsamaisong tse fapaneng tsa ts'ebetso molao-motheo oa mosebetsi o fapane, empa bakeng sa phetisetso ea Linux kamehla e batla e ts'oana, empa re ka rata ho bolela hore na Java e kentsoe joang ho Ubuntu. Beng ba likopano tse ling ba tla hloka feela ho pheta litaelo tse fanoeng, ba nahanisisa ka syntax ea sistimi.

Kenya Java JRE / JDK ho Linux

Kajeno re fana ka maikutlo a hore u ithute mekhoa e fapaneng ea ho kenya lilaebrari tsa Java, hobane kaofela li tla ba molemo haholo hape li sebetsa maemong a itseng. Mohlala, haeba u sa batle ho sebelisa polokelo ea motho oa boraro kapa haeba u batla ho beha Java e 'maloa haufi, u lokela ho sebelisa khetho e arohaneng. Leha ho le joalo, a re hlahlobeng kaofela ha tsona.

Taba ea mantlha, ho khothalletsoa ho lekola lintlafatso tsa polokelo ea sistimi le ho fumana mofuta oa hona joale oa Java, haeba o teng, ho OS. Sena sohle se etsoa ka khokahano e tloaelehileng:

  1. Bula menyu 'me u balehe "Mokhatlo oa" terminal ".
  2. Kenya taelosudo apt-fumana ntjhafatso.
  3. Kenya phasewete ho tsoa akhaonteng ea hau ho fumana motso.
  4. Kamora ho amohela lipakete, sebelisa taelojava -versionho sheba tlhaiso-leseling ea Java.
  5. Haeba u amohela tsebiso e tšoanang le e ka tlase, ho bolela hore Java ha e fumanehe ho OS ea hau.

Mokhoa oa 1: Likhosete tsa Molao

Mokhoa o bonolo ke ho sebelisa polokelo ea semmuso ho jarolla Java, eo baetsi ba eona ba e jarileng moo. U hloka feela ho ngolisa litaelo tse 'maloa ho eketsa likarolo tsohle tse hlokahalang.

  1. Matha "Mokhatlo oa" terminal " mme o ngole moosudo apt-kenya hlomamisa-jdkebe o tobetsa Kena.
  2. Netefatsa uploading ea faele.
  3. Joale eketsa JRE ka ho thaepa taelosudo apt-kenya hlomamisa-jre.
  4. Plugin ea sebatli, e eketsoa kasudo apt-kenya kenya icedtea-plugin.
  5. Haeba u thahasella ho fumana litokomane mabapi le likarolo tse kenyelletsoeng, li jarolle ka taelosudo apt-kenya-default-jdk-doc.

Le ha mokhoa ona o le bonolo, ha oa lokela ho kenya lilaebrari tsa morao-rao tsa Java, kaha ha li e-so beoe kantle ho polokelo ea molao haufinyane. Ke ka lebaka leo re fanang ka maikutlo a hore u ithute mekhoa e latelang ea ho kenya.

Mokhoa oa 2: Sebaka sa marang-rang

Ho na le polokelo ea basebelisi e bitsoang Webupd8, e nang le mongolo o bapisang mofuta oa hona joale oa Java le o mong sebakeng sa Oracle. Mokhoa ona oa ho kenya o na le thuso ho ba batlang ho kenya tse ncha tse ncha (e leng ea ho qetela e fumanehang polokelong ea Oracle).

  1. Ho khokahano, kenyasudo-add-apt-repository ppa: webupd8team / java.
  2. Etsa bonnete ba hore u kenyelletsa password ea hau.
  3. Netefatsa ts'ebetso ea tlatsetso ka ho tobetsa Kena.
  4. Emela lifaele hore li phethe ntle le ho koala "Mokhatlo oa" terminal ".
  5. Ntlafatsa polokelo ea sistimi ka taelosudo apt-fumana ntjhafatso.
  6. Hona joale o lokela ho kenyelletsa sets'oants'o sa graphical ka ho kenyaSudo apt-get or or-java8-instil.
  7. Amohela tumellano ea laesense ea ho hlophisa sephutheloana.
  8. Lumellana ho eketsa lifaele tsamaisong.

Qetellong ea ts'ebetso ena, ho tla ba le taelo ea hore u kenye mofuta oa mofuta -sudo apt-get or or-java7-kenyakae java7 - Phetolelo ea Java. Mohlala, o ka fana ka taelojava9kapajava11.

Sehlopha se tla thusa ho tlosa bahlahisi ba sa hlokahaleng.sudo apt-get oracle-java8-kenyakae java8 - Phetolelo ea Java.

Mokhoa oa 3: Ntlafatsa sebelisa Webupd8

Ka holimo, re buile ka ho kenya likopano re sebelisa polokelo ea setso ea Webupd8. Ka lebaka la polokelo e tšoanang, u ka ntlafatsa mofuta oa Java hore e be oa morao-rao ka mokhoa oa mongolo o bapisang.

  1. Pheta mehato ea pele e mehlano ho tsoa litaelo tse fetileng haeba ha u e-so etse mehato ena.
  2. Kenya taelosudo ntjha-javaebe o tobetsa Kena.
  3. Sebelisa taelosudo apt-kenya kenya-upva-javaho kenya liapdeite haeba li fumanoa.

Mokhoa oa 4: Keketso ea Buka

Mohlomong mokhoa ona ke o thata haholo ho feta oo re o hlahlobileng sengolong sena, empa o tla u lumella ho fumana mofuta o hlokahalang oa Java ntle le ho sebelisa li-replication tsa motho oa boraro le likarolo tse ling tse eketsehileng. Ho etsa mosebetsi ona, o tla hloka sebatli leha e le sefe se teng mme "Mokhatlo oa" terminal ".

  1. E etela sebatli sa marang-rang, e ea leqepheng la semmuso la Oracle ho jarolla Java, moo u tobetsang "Khoasolla" kapa khetha mofuta o mong oo u o hlokang.
  2. Ka tlase ke lipakete tse ling tse nang le lilaebrari. Re khothaletsa ho jarolla pokello ea akhaonte tar.gz.
  3. Eya foldareng ea polokelo ea litokelo, tlanya ho eona ebe u khetha "Thepa ea matlo".
  4. Hopola sebaka sa sephutheloana, kaha u tlameha ho ea ho sona ka khokahanyo.
  5. Matha "Mokhatlo oa" terminal " mme o tsamaise taelocd / home / mosebelisi / foldarengkae mosebelisi - mosebelisi, mme foldara - lebitso la polokelo ea polokelo ea polokelo ea polokelo.
  6. Etsa phasewete ho hlakola polokelo ea pokello ea litaba. Hangata likarolo tsohle li kenngoa ka jvm. Ho etsa motsamaisi ka ho kenasudo mkdir -p / usr / lib / jvm.
  7. Tšolla sethala sa khale se seng se le teng ka har'a foldara e entsoengsudo tar -xf jdk-11.0.2_linux-x64_bin.tar.gz -C / usr / lib / jvmkae jdk-11.0.2_linux-x64_bin.tar.gz - lebitso la polokelo ea litaba.
  8. Ho eketsa litsela, o tla hloka ho kenya litaelo tse latelang tatellano:

    Sudo-e-ngoe-mekhoa-install / usr / bin / java java /usr/lib/jvm/jdk1.8.0/bin/java 1
    Sudo-e-ngoe-mekhoa - -sstall / usr / bin / javac javac /usr/lib/jvm/jdk1.8.0/bin/javac 1
    Sudo-e-mekhoa-sistere - -sstall / usr / bin / javaws javaws /usr/lib/jvm/jdk1.8.0/bin/javaws 1

    E 'ngoe ea litsela tse fapaneng e kanna ea se be teng, ho latela mofuta o khethiloeng oa Java.

  9. E sala feela ho phethahatsa tlhophiso ea tsela e 'ngoe le e' ngoe. Pele etsalintlafatso tsa sudo-mekhoa --config java, fumana mofuta o nepahetseng oa Java, u hlahlobe nomoro ea eona ebe u ngola ho consolese.
  10. Pheta hape kasudo-li-mekhoa tse ling --config javac.
  11. Ka mor'a moo, hlophisa tsela ea ho qetelasudo-li-mekhoa-likhokahano tsaconfig.
  12. Lekola katleho ea liphetoho ka ho lemoha mofuta o sebetsang oa Java (java -version).

Joalokaha u bona, ho na le palo e kholo ea mekhoa ea ho kenya Java tsamaisong ea ts'ebetso ea Linux, kahoo mosebelisi ka mong o tla fumana khetho e loketseng. Haeba u sebelisa sesebelisoa se khethehileng sa thomello mme mekhoa e kaholimo e sa sebetse, ithute ka hloko liphoso tse bontšitsoeng ho khokahano ebe u sebelisa mehloli ea semola ho rarolla bothata.

Pin
Send
Share
Send