Kab lus no yog rau 32-ntsis thiab 64-ntsis version ntawm Oracle Java 8 JDK kev teeb tsa (cov version uas kab lus no tau sau yog 1.8.0_20) ntawm 32-ntsis thiab 64-ntsis Ubuntu kev ua haujlwm. Cov lus qhia no tseem tuaj yeem siv rau Debian thiab Linux Mint.
Cov ntawv qhia no yog rau koj cov uas tsuas xav txhim kho Oracle Java JDK nrog Oracle Java JRE suav nrog hauv JDK rub tawm. Oracle Java JDK cov lus qhia teeb tsa tsuas yog siv rau Debian-based Linux ua haujlwm, piv txwv li: Debian, Linux Mint, lossis Ubuntu.
Kauj ruam
Kauj Ruam 1. Saib seb koj li Ubuntu Linux operating system architecture architecture ua haujlwm 32 ntsis lossis 64 ntsis
Qhib davhlau ya nyob twg thiab khiav cov lus txib no
-
Hom/Luam/Muab Tshuaj:
cov ntaub ntawv /sbin /init
Nco tseg me ntsis version ntawm Ubuntu Linux operating system architecture uas tshwm, txawm tias 32 ntsis lossis 64 ntsis
Kauj Ruam 2. Tshawb xyuas seb koj lub kaw lus puas tau teeb tsa Java
Txog qhov ntawd, khiav java version hais kom ua los ntawm lub davhlau ya nyob twg.
-
Qhib lub davhlau ya nyob twg, tom qab ntawd nkag mus rau cov lus txib hauv qab no:
-
Hom/Luam/Muab Tshuaj:
java -version
-
-
Yog tias koj twb muaj OpenJDK ntawm koj lub kaw lus, kab no yuav tshwm sim:
-
java version "1.7.0_15"
OpenJDK Runtime Environment (IcedTea6 1.10pre) (7b15 ~ pre1-0lucid1)
OpenJDK 64-Bit Server VM (tsim 19.0-b09, hom sib xyaw)
-
- Yog tias OpenJDK twb muaj nyob ntawm koj lub kaw lus, tus muag khoom tsis raug ntawm Java tau raug teeb tsa ntawm koj lub kaw lus.
Kauj Ruam 3. Ua tiav tshem tawm OpenJDK/JRE los ntawm kab ke, tom qab ntawd tsim daim nplaub tshev los tuav Oracle Java JDK/JRE binary
Qhov no muaj txiaj ntsig zoo rau kev tiv thaiv kab ke tsis sib haum thiab tsis meej pem ntawm cov neeg muag khoom sib txawv ntawm Java. Piv txwv li, yog tias twb muaj OpenJDK/JRE ntawm lub kaw lus, tshem nws los ntawm kev ntaus cov lus txib no ntawm kab hais kom ua:
-
Hom/Luam/Muab Tshuaj:
sudo apt-tau tshem tawm openjdk-\*
Cov lus txib saum toj no yog tshem tawm OpenJDK/JRE tag nrho los ntawm kab ke
-
Hom/Luam/Muab Tshuaj:
sudo mkdir -p/usr/zos/java
Cov lus txib no yuav tsim daim nplaub tshev los tuav Oracle Java JDK thiab JRE binaries
Kauj Ruam 4. Rub Oracle Java JDK rau Linux
Koj yuav tsum xaiv qhov compressed binary uas tsim nyog rau 32 ntsis lossis 64 ntsis system architecture (nrog tar.gz cov ntaub ntawv txuas ntxiv)
- Yog tias koj siv 32 ntsis Ubuntu Linux operating system, rub tawm 32 ntsis Oracle Java binary.
- Yog tias koj siv 64 ntsis Ubuntu Linux operating system, rub tawm 64 ntsis Oracle Java binary.
-
Koj tseem tuaj yeem rub tawm Oracle Java JDK cov ntaub ntawv
Xaiv jdk-8u20-apidocs.zip
-
Cov Ntaub Ntawv Tseem Ceeb:
Oracle Java 64 ntsis binary tsis tuaj yeem siv ntawm 32 ntsis Ubuntu Linux operating system. Tus lej ntawm kab lus yuam kev yuav tshwm yog tias koj sim teeb tsa Oracle Java 64 ntsis ntawm Ubuntu Linux 32 ntsis.
Kauj Ruam 5. Luam Oracle Java binary rau hauv daim nplaub tshev hauv zos/usr/local/java
Feem ntau Oracle Java binary tau rub mus rau: /home /"koj_user_name"/Rub tawm.
-
Oracle Java 32 ntsis teeb tsa cov lus qhia ntawm Ubuntu Linux 32 ntsis:
-
Hom/Luam/Muab Tshuaj:
cd /tsev /' "koj_user_name" /Rub tawm
-
Hom/Luam/Muab Tshuaj:
sudo cp -r jdk-8u20-linux-i586.tar.gz/usr/zos/java/
-
Hom/Luam/Muab Tshuaj:
cd/usr/zos/java/
-
-
Oracle Java 64 ntsis teeb tsa cov lus qhia ntawm Ubuntu Linux 64 ntsis:
-
Hom/Luam/Muab Tshuaj:
cd /tsev /' "koj_user_name" /Rub tawm
-
Hom/Luam/Muab Tshuaj:
sudo cp -r jdk-8u20-linux-x64.tar.gz/usr/zos/java/
-
Hom/Luam/Muab Tshuaj:
cd/usr/zos/java/
-
Kauj Ruam 6. Tshem tawm cov ntaub ntawv Java binary hauv/usr/local/java/folder
-
Oracle Java 32 ntsis teeb tsa cov lus qhia ntawm Ubuntu Linux 32 ntsis:
-
Hom/Luam/Muab Tshuaj:
sudo tar xvzf jdk-8u20-linux-i586.tar.gz
-
-
Oracle Java 64 ntsis teeb tsa cov lus qhia ntawm Ubuntu Linux 64 ntsis:
-
Hom/Luam/Muab Tshuaj:
sudo tar xvzf jdk-8u20-linux-x64.tar.gz
-
Kauj Ruam 7. Txheeb xyuas koj daim nplaub tshev dua
Txij ntawm no mus, koj yuav tsum muaj ob daim ntawv rho tawm binary folders hauv/usr/local/java/rau Java JDK/JRE teev raws li:
-
Hom/Luam/Muab Tshuaj:
ls -ib
- jdk1.8.0_20
- jre1.8.0_20
Kauj Ruam 8. Kho PATH file system /etc /profile, tom qab ntawd ntxiv cov kab ke no hloov pauv mus rau txoj kab ke
Siv cov ntawv sau zoo li nano lossis gedit ua lub hauv paus, tom qab ntawd qhib /etc /profile.
-
Hom/Luam/Muab Tshuaj:
sudo gedit /etc /profile
- los yog
-
Hom/Luam/Muab Tshuaj:
sudo nano /thiab /profile
Kauj Ruam 9. Qhib mus rau qhov kawg ntawm cov ntaub ntawv siv cov xub tuav ntawm koj cov keyboard thiab ntxiv kab hauv qab no thaum kawg ntawm /etc /profile file:
-
Hom/Luam/Muab Tshuaj:
JAVA_HOME =/usr/zos/java/jdk1.8.0_20
JRE_HOME =/usr/zos/java/jre1.8.0_20
PATH = $ PATH: $ JRE_HOME/bin: $ JAVA_HOME/bin
export JAVA_HOME
export JRE_HOME
export PAJ
Kauj Ruam 10. Txuag cov ntaub ntawv /etc /profile, ces tawm mus
Kauj Ruam 11. Qhia rau Ubuntu Linux system qhov twg Oracle Java JDK/JRE nyob
Qhov no yuav ceeb toom rau lub system tias Oracle Java version tshiab muaj.
-
Hom/Luam/Muab Tshuaj:
sudo hloov kho-lwm txoj kev-nruab "/usr/bin/java" "java" "/usr/local/java/jdk1.8.0_20/bin/java" 1
Cov lus txib no yuav ceeb toom rau lub system tias Oracle Java JRE tab tom ua haujlwm
-
Hom/Luam/Muab Tshuaj:
sudo hloov kho-hloov pauv-nruab "/usr/bin/javac" "javac" "/usr/local/java/jdk1.8.0_20/bin/javac" 1
Cov lus txib no yuav ceeb toom rau lub system tias Oracle Java JDK npaj siv
-
Hom/Luam/Muab Tshuaj:
sudo hloov kho-hloov pauv-nruab "/usr/bin/javaws" "javaws" "/usr/local/java/jdk1.8.0_20/bin/javaws" 1
Cov lus txib no ceeb toom rau lub system tias Oracle Java Web pib tau pib thiab ua haujlwm
Kauj Ruam 12. Qhia rau Ubuntu Linux system tias Oracle Java JDK/JRE yuav tsum yog Java default
-
Hom/Luam/Muab Tshuaj:
sudo hloov tshiab-lwm -set java /usr/local/java/jdk1.8.0_20/bin/java
Cov lus txib no yog teeb tsa Java ib puag ncig kev ua haujlwm ntawm lub kaw lus
-
Hom/Luam/Muab Tshuaj:
sudo hloov tshiab-lwm -set javac /usr/local/java/jdk1.8.0_20/bin/javac
Cov lus txib no yog teeb tsa javac compiler ntawm kab ke
-
Hom/Luam/Muab Tshuaj:
sudo hloov tshiab-lwm -set javaws /usr/local/java/jdk1.8.0_20/bin/javaws
Cov lus txib no yog teeb tsa Java Web pib ntawm lub kaw lus
Kauj Ruam 13. Rov PATH /etc /profile ntawm lub kaw lus los ntawm kev ntaus cov lus txib no:
-
Hom/Luam/Muab Tshuaj:
qhov chaw /etc /profile
- Nco ntsoov tias PATH /etc /profile ntawm lub kaw lus yuav rov pib dua tom qab Ubuntu Linux system tau rov pib dua
Kauj Ruam 14. Kuaj seb puas yog Oracle Java raug teeb tsa raug rau hauv kab ke
Khiav qhov lus txib no thiab pom qhov twg ntawm Java tshwm:
Kauj Ruam 15. Kev ua tiav kev teeb tsa ntawm Oracle Java 32 ntsis yuav tso saib:
-
Hom/Luam/Muab Tshuaj:
java -version
Cov lus txib no yuav tso tawm Java version tam sim no ua haujlwm ntawm lub kaw lus
-
Cov lus yuav tshwm sim uas qhia:
-
java version "1.8.0_20"
Java (TM) SE Runtime Environment (tsim 1.8.0_20-b26)
Java HotSpot (TM) Server VM (tsim 25.20-b23, hom sib xyaw)
-
-
Hom/Luam/Muab Tshuaj:
javac -rov qab
Cov lus txib no yog qhia rau koj paub tias tam sim no koj tuaj yeem suav Java cov haujlwm los ntawm lub davhlau ya nyob twg
-
Cov lus yuav tshwm sim uas qhia:
Javac 1.8.0_20
Kauj Ruam 16. Kev ua tiav kev teeb tsa ntawm Oracle Java 64 ntsis yuav tso tawm:
-
Hom/Luam/Muab Tshuaj:
java -version
Cov lus txib no yuav tso tawm Java version tam sim no ua haujlwm ntawm lub kaw lus
-
Cov lus yuav tshwm sim uas qhia:
-
java version "1.8.0_20"
Java (TM) SE Runtime Environment (tsim 1.8.0_20-b26)
Java HotSpot (TM) Server VM (tsim 25.20-b23, hom sib xyaw)
-
-
Hom/Luam/Muab Tshuaj:
javac -rov qab
Cov lus txib no yog qhia rau koj paub tias tam sim no koj tuaj yeem suav Java cov haujlwm los ntawm lub davhlau ya nyob twg
-
Cov lus yuav tshwm sim uas qhia:
Javac 1.8.0_20
Kauj Ruam 17. Nrog koj zoo siab
Koj tau ua tiav teeb tsa Oracle Java ntawm koj li Linux system. Rov pib dua lub kaw lus. Tom qab ntawd, lub kaw lus yuav raug teeb tsa kom khiav thiab txhim kho Java cov haujlwm. Tom qab koj tuaj yeem sim ua ke thiab khiav Java cov haujlwm koj tus kheej.
Yeem: Yuav ua li cas pab kom Oracle Java hauv Web Browser
Txhawm rau pab Java plug-in hauv web browser, tsim lub cim txuas los ntawm lub vev xaib browser plug-ins nplaub tshev mus rau Java plug-in qhov chaw hauv koj li Oracle Java faib
Cov Ntaub Ntawv Tseem Ceeb:
Pab kom Oracle Java 7 hauv lub vev xaib yuav nthuav tawm ntau qhov tsis raug thiab kev siv Java. Yeej, ua kom muaj Oracle Java 7 hauv lub vev xaib browser txaus ntshai caw cov neeg nyiag nkag mus rau hauv koj lub system. Yog xav paub ntau ntxiv txog kev ruaj ntseg tsis zoo thiab siv tsis tau hauv Java, mus ntsib hauv qab no Askiv lub vev xaib: Java Tester
Google Chrome
Oracle Java 32 ntsis qhia:
-
Nkag mus rau cov lus txib hauv qab no.
-
Hom/Luam/Muab Tshuaj:
sudo mkdir -p/opt/google/chrome/plugins
Cov lus txib no yuav tsim cov npe npe/opt/google/chrome/plugins
-
Hom/Luam/Muab Tshuaj:
cd/opt/google/chrome/plugins
Cov lus txib no yuav muab koj tso rau hauv Google Chrome plug-ins nplaub tshev. Koj yuav tsum nyob hauv daim nplaub tshev no ua ntej tsim lub cim txuas
-
Hom/Luam/Muab Tshuaj:
sudo ln -s /usr/local/java/jdk1.8.0_20/jre/lib/ib 386/libnpjp2.so
Cov lus txib no yuav tsim lub cim txuas los ntawm Java JRE (Java Runtime Environment) plug-in libnpjp2.so mus rau Google Chrome web browser.
-
Oracle Java 64 ntsis qhia:
-
Sau cov lus txib hauv qab no.
-
Hom/Luam/Muab Tshuaj:
sudo mkdir -p/opt/google/chrome/plugins
Cov lus txib no yuav tsim cov npe npe/opt/google/chrome/plugins
-
Hom/Luam/Muab Tshuaj:
cd/opt/google/chrome/plugins
Cov lus txib no yuav muab koj tso rau hauv Google Chrome plug-ins nplaub tshev. Koj yuav tsum nyob hauv daim nplaub tshev no ua ntej tsim lub cim txuas
-
Hom/Luam/Muab Tshuaj:
sudo ln -s /usr/local/java/jdk1.8.0_20/jre/lib/amd64 ua/libnpjp2.so
Cov lus txib no yuav tsim lub cim txuas los ntawm Java JRE (Java Runtime Environment) plug-in libnpjp2.so mus rau Google Chrome web browser.
-
Nco ntsoov:
-
Sau ntawv:
Qee zaum cov lus txib saum toj no tuaj yeem nqa cov lus hauv qab no:
- ln: tsim cov cim txuas `./libnpjp2.so ': Cov ntaub ntawv muaj nyob
- Txhawm rau daws qhov teeb meem no, tshem tawm cov cim txuas yav dhau los siv cov lus txib no:
-
Hom/Luam/Muab Tshuaj:
cd/opt/google/chrome/plugins
-
Hom/Luam/Muab Tshuaj:
sudo rm -rf libnpjp2.so
- Nco ntsoov tias koj nyob hauv/opt/google/chrome/plugins nplaub tshev ua ntej koj nkag mus rau lo lus txib ntawd.
-
Rov pib lub web browser thiab tom qab ntawd mus ntsib Java Tester txhawm rau txheeb xyuas yog tias Java ua haujlwm hauv koj lub browser.
Mozilla Firefox
Oracle Java 32 ntsis qhia:
-
Nkag mus rau cov lus txib hauv qab no.
-
Hom/Luam/Muab Tshuaj:
cd/usr/lib/mozilla/plugins
Cov lus txib no yuav muab koj tso rau hauv/usr/lib/mozilla/plugins nplaub tshev. Tsim cov ntawv no yog tias nws tsis tau nyob hauv koj lub cev
-
Hom/Luam/Muab Tshuaj:
sudo mkdir -p/usr/lib/mozilla/plugins
Cov lus txib no yuav tsim daim nplaub tshev hu ua/usr/lib/mozilla/plugins. Koj yuav tsum nyob hauv daim nplaub tshev no ua ntej tsim lub cim txuas
-
Hom/Luam/Muab Tshuaj:
sudo ln -s /usr/local/java/jdk1.8.0_20/jre/lib/ib 386/libnpjp2.so
Cov lus txib no yuav tsim lub cim txuas los ntawm Java JRE (Java Runtime Environment) plug-in libnpjp2.so mus rau Mozilla Firefox browser
-
Oracle Java 64 ntsis qhia:
-
Sau cov lus txib hauv qab no.
-
Hom/Luam/Muab Tshuaj:
cd/usr/lib/mozilla/plugins
Cov lus txib no yuav muab koj tso rau hauv/usr/lib/mozilla/plugins nplaub tshev. Tsim cov ntawv no yog tias nws tsis tau nyob hauv koj lub cev
-
Hom/Luam/Muab Tshuaj:
sudo mkdir -p/usr/lib/mozilla/plugins
Cov lus txib no yuav tsim daim nplaub tshev hu ua/usr/lib/mozilla/plugins. Koj yuav tsum nyob hauv daim nplaub tshev no ua ntej tsim lub cim txuas
-
Hom/Luam/Muab Tshuaj:
sudo ln -s /usr/local/java/jdk1.8.0_20/jre/lib/amd64 ua/libnpjp2.so
Cov lus txib no yuav tsim lub cim txuas los ntawm Java JRE (Java Runtime Environment) plug-in libnpjp2.so mus rau Mozilla Firefox browser
-
Nco ntsoov:
-
Sau ntawv:
Qee zaum cov lus txib saum toj no tuaj yeem nqa cov lus hauv qab no:
- ln: tsim cov cim txuas `./libnpjp2.so ': Cov ntaub ntawv muaj nyob
- Txhawm rau daws qhov teeb meem no, tshem tawm cov cim txuas yav dhau los siv cov lus txib no:
-
Hom/Luam/Muab Tshuaj:
cd/usr/lib/mozilla/plugins
-
Hom/Luam/Muab Tshuaj:
sudo rm -rf libnpjp2.so
- Nco ntsoov tias koj nyob hauv/usr/lib/mozilla/plugins nplaub tshev ua ntej koj nkag mus rau lo lus txib ntawd.
-
Rov pib lub web browser thiab tom qab ntawd mus ntsib Java Tester txhawm rau txheeb xyuas yog tias Java ua haujlwm hauv koj lub browser.
-