Txhim kho los yog muab kho dua Java nyob Ubuntu

Xav rau nruab Java rau Ubuntu li ntawd, nws yog tshuaj Hmoob thiab nyab xeeb uas tsuas 4 Ruam? Ntawm no yog ib txoj kev ceev thaum ua li no tsis tas siv lwm-tus neeg repositories.

javaubuntu

Txoj kev

Kom koj tsis txhob xav tias cov ncej yog ntev thiab nyuab, pib no ncej thaum xaus, Short hauv lub commands ntxiv rau nruab los yog kho Java. Yog hais tias koj muaj lus nug thiab xav paub meej ntxiv, Thov koj nyeem tag nrho ncej. Tsuas yog 4 Ruam!

 
# NTSIS: Verifique a versão do Java antes e depois da instalação/atualização com o comando "java -version" ntawm Terminal (CTRL + ZOO + T).

1. Nyob Ubuntu, Qhib lub Terminal (CTRL + ZOO + T) thiab ua kom muaj tus plahaum directory tus Java (Puas muaj tsis muaj)
   sudo mkdir /Opt/Java
2. Tshem cov plahaum qub (Yog hais tias muaj): 
   sudo rm -r /Opt/Java/JRE
3. Ces +tshiab Java http version://www.java.com/pt_BR/download/Manual.jsp#lin (xaiv Linux x 64)
 
4. Khiav qhov hais kom ua rau nruab los yog kho Java sudo mv ~/Downloads/JRE-8u101-Linux-x 64.ib.gz /Opt/Java && CD /Opt/Java && sudo ib -xvf jre-8u101-Linux-x 64.ib.gz && sudo mv ./jre1* ./JRE && sudo rm -(f) ./JRE-*.ib.gz xim: 
   ~/Downloads/ yog tus twg koj downloaded tus tshiab Java directory.
   JRE-8u101-Linux-x 64.ib.gz yog ib lub npe tus tshiab Java thov koj downloaded (HLOOV 2 x!!!)
   /Opt/Java yog tus uas peb yuav nruab rau ib Java directory

Nws cia li ntawd yog, Kuv siv thiab nws ua haujlwm!

 


Teeb meem

Lub sij hawm los yog lwm tus Java suffers hloov tshiab ib, ces peb yeej muaj qhov disadvantage ntawm kev ua tau zoo ntawd daim commands. Yog hais tias koj xav tau no ua li cas tau yooj yim, nrhiav hauv Internet li cas ntxiv lwm-tus neeg repositories thiab nruab Java ntawm apt-tau. Qhov no yuav tsis tau lub ntsiab lus ntawm no ncej.

Nyob rau hauv tsev xa no peb yuav pom lub! Tsab cai idea uas yog yuav tau ua txhua yam los ntawm cov pa hom, IE, Sau lub java.com Web site thiab ua raws li tus txheej txheem plahaum. Tab sis kuv paub tseeb tias koj tsis mob, yuav tsum siv txoj kev no thiab ces kuv txiav txim siab tso npe no.

Tov

Ua ntej koj pib, cia tias cov txheej txheem tau ua nyob rau hauv ib qho chaw siv Ubuntu Linux thiab Firefox browser tseeb heev. Peb xav txog, tseem, Java tau ntsia / muab kho rau cov directory /Opt/java/jre. Yog no directory tsis nyob ua ib ke, txhob txhawj, Peb yuav tsim nws tom qab.

Yog nws nthuav koj kuj nrhiav tau lub Java version ua ntej thiab tom qab cov plahaum / Hloov tshiab. Koj yuav tau ua qhov no ua ob yam:

1. Xyuas cov version ntawm Java mus txog tus Terminal | Xyuas seb koj version tam sim no ntawm Java, qhib cov davhlau ya nyob twg (CTRL + ZOO + T) thiab hom:

  Java -Version

2. Xyuas cov version ntawm Java los ntawm qhov browser | Xyuas seb koj version tam sim no ntawm Java, saib rau ntawm http://java.com/verify los yog qhib qhov Firefox browser ces ntaus hauv lub chaw nyob bar:

  http://java.com/verify

Kauj ruam 1

Ua tau ib lub Java plahaum directory, Puas muaj tsis muaj. Nyob Ubuntu, Qhib lub Terminal (CTRL + ZOO + T) thiab tsim cov directory /Opt/java Cov plahaum Java, tiam sis yog nws tsis nyob ua ib ke, tau mas!

  sudo mkdir /Opt/Java

Kauj ruam 2

Tshem cov qub Java, Yog hais tias muaj. Nyob rau hauv cov Terminal (CTRL + ZOO + T), Sau qhov hais kom ua nram qab no kom tshem tus plahaum laus ntawm Java (Yog hais tias muaj).

  sudo rm -r /Opt/Java/JRE

Kauj ruam 3

Ces + tshiab Java version. Sib ntsib http://www.java.com/pt_BR/download/manual.jsp#lin, Xaiv Linux x 64 thiab ces. Cov ntaub ntawv yog ib yam dab tsi zoo li “jre-8u101-linux-x64.tar.gz“.

Kauj ruam 4

Qhov hais kom ua rau nruab tiv cav / Hloov Java. Whereas cov ntaub ntawv koj downloaded hauv lub ces yog (/tsev/neeg/ces), luam thiab paste qhov hais kom ua nram qab no nyob hauv Terminal, hloov “jre-8u101-linux-x64.tar.gz” yog li lub npe ntawm cov ntaub ntawv yog koj nyuam qhuav downloaded (Ceeb toom tias nws yuav zoo nkaus li ob zaug ntawm qhov hais kom ua).

  sudo mv ~/Downloads/JRE-8u101-Linux-x 64.ib.gz /Opt/Java && CD /Opt/Java && sudo ib -xvf jre-8u101-Linux-x 64.ib.gz && sudo mv ./jre1* ./JRE && sudo rm -(f) ./JRE-*.ib.gz

Nyob rau saum toj no hais kom ua, Nco ntsoov tias:
~/Downloads/ yog tus twg koj downloaded tus tshiab Java directory.
jre-8u101-linux-x64.tar.gz yog ib lub npe ntawm koj tej ntaub ntawv Java tshiab (hloov!)
/Opt/java yog tus uas peb yuav nruab rau ib Java directory

Yeej ua tau qhov no txhua yam yuav tau ua hauj lwm! Ntsuam xyuas qhov Terminal thiab ntawm qhov Browser version Java li Kauj ruam 1.

Lus

Thawj tus plahaum ntawm Java

Yog hais tias nws yog tus plahaum thawj ntawm JAVA, luam thiab paste qhov hais kom ua nram qab no nyob hauv Terminal, kho ib txog kev tseeb plahaum yog tsim nyog:

sudo hloov tshiab-cawm --􀂃 cia li nruab /usr/rau hauv/Java java /Opt/Java/JRE/rau hauv/Java 10 && sudo hloov tshiab-cawm --koj muab java /Opt/Java/JRE/rau hauv/Java

Muab kho dua rau lub plugin Firefox

Thaum kuaj hauv qhov Terminal nrog Java-version (saib cov kauj ruam 1), Nco ntsoov tias tus kho tshiab version twb khiav khiav. Txawm li cas los, nws puas tau sim rau Firefox browser, kev kuaj http://java.com/verify, uas tseem nyob qhov qub version. Yuav kom daws tau qhov no, mam li siv cov lus hauv qab no hais kom ua los hloov cov kev txuas mus rau plugin Firefox

  CD /usr/lib/Firefox-addons/plugins/ && cov haujlwm uas yog COy sudo -s /Opt/Java/JRE/lib/AMD64/libnpjp2.thiaj li

Tus ntawd yog nws!

Tag nrho hits: 798

sau ntawv cia

Qhov koj email chaw nyob yuav tsis muab luam tawm. Search yog cim muaj *