Qhov kev qhia no yuav npog kev txhim kho ob qho 32-ntsis thiab 64-ntsis Oracle Java 7 JDK/JRE (tus lej tam sim no yog 1.7.0_45) ntawm 32-ntsis thiab 64-ntsis Ubuntu kev ua haujlwm. Phau ntawv qhia no tseem siv rau Debian thiab Linux Mint. Rau cov uas koj xwb xav nruab Oracle Java JRE kom khiav Java daim ntawv thov thiab tsis tsim Java cov haujlwm, siv txoj hauv kev no:
Txhim kho Oracle Java JRE ntawm Linux Ubuntu
Rau cov ntawm koj uas xav teeb tsa Oracle Java JDK txhawm rau txhim kho Java cov haujlwm thiab cov ntawv thov (Oracle Java JRE tseem suav nrog hauv Oracle JDK), siv txoj hauv kev no:
Txhim kho Oracle Java JDK ntawm Ubuntu Linux
Kauj ruam
Kauj Ruam 1. Txheeb xyuas yog tias koj li Ubuntu Linux operating system yog 32-ntsis lossis 64-ntsis architecture
Qhib lub davhlau ya nyob twg thiab khiav cov lus txib hauv qab no.
-
Hom/Luam/Muab Tshuaj:
cov ntaub ntawv /sbin /init
Qhov me ntsis ntawm koj li Ubuntu Linux kev ua haujlwm kev tsim qauv yuav tso tawm raws li 32-ntsis lossis 64-ntsis
Kauj Ruam 2. Txheeb xyuas yog tias Java tau teeb tsa hauv koj lub kaw lus lawm
Txhawm rau ua qhov no, koj yuav tsum tau khiav Java version ntawm cov lus txib los ntawm lub davhlau ya nyob twg.
-
Qhib lub davhlau ya nyob twg thiab nkag mus rau cov lus txib hauv qab no:
-
Hom/Luam/Muab Tshuaj:
java -version
-
-
Yog tias OpenJDK twb tau teeb tsa hauv kab ke, cov ntawv hauv qab no yuav tshwm ntawm qhov screen:
-
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 tau teeb tsa ntawm koj lub kaw lus, nws txhais tau tias koj muaj tus muag khoom tsis raug ntawm Java rau txoj kev no.
Kauj Ruam 3. Tshem OpenJDK/JRE los ntawm koj lub kaw lus thiab tsim cov npe los tuav koj li Oracle Java JDK/JRE binary
Qhov no yuav tiv thaiv lub kaw lus los ntawm kev ntsib teeb meem thiab tsis meej pem vim txawv version ntawm cov neeg muag khoom Java. Piv txwv li, yog tias koj muaj OpenJDk/Jre teeb tsa ntawm koj lub kaw lus, koj tuaj yeem tshem nws los ntawm kev ntaus kab lus hais hauv qab no:
-
Hom/Luam/Muab Tshuaj:
sudo apt-tau tshem tawm openjdk-\*
Cov lus txib no yuav tshem tawm OpenJDK/JRE tag nrho los ntawm koj lub system
-
Hom/Luam/Muab Tshuaj:
sudo mkdir -p/usr/zos/java
Cov lus txib no yuav tsim cov npe los tuav koj li Oracle Java JDK thiab JRE binaries
Kauj Ruam 4. Rub Oracle Java JDK/JRE rau Linux
Nco ntsoov tias koj xaiv compressed binary txoj cai rau 32-ntsis lossis 64-ntsis system architectures (cov uas xaus rau hauv tar.gz).
- Piv txwv li, yog tias koj siv 32-ntsis Ubuntu Linux kev ua haujlwm, rub tawm 32-ntsis Oracle Java binary.
- Piv txwv li, yog tias koj siv 64-ntsis Ubuntu Linux operating system, rub tawm 64-ntsis Oracle Java binary.
-
Yeem, Rub tawm Oracle Java JDK/JRE Cov ntaub ntawv
Xaiv jdk-7u40-apidocs.zip
-
Cov Ntaub Ntawv Tseem Ceeb:
64-ntsis Oracle Java binary tsis ua haujlwm ntawm 32-ntsis Ubuntu Linux kev ua haujlwm. Yog tias koj sim teeb tsa 64-ntsis Oracle Java ntawm 32-ntsis Ubuntu Linux, koj yuav tau txais ntau cov kab lus yuam kev.
Kauj Ruam 5. Luam Oracle Java binary mus rau/usr/local/java directory
Feem ntau Oracle Java binary yuav raug rub mus rau: /home /"koj_user_name"/Rub tawm.
-
Qhia rau txhim kho Oracle Java 32-ntsis ntawm Linux Ubuntu 32-ntsis:
-
Hom/Luam/Muab Tshuaj:
cd ~/Rub tawm
-
Hom/Luam/Muab Tshuaj:
sudo cp -r jdk-7u45-linux-i586.tar.gz/usr/local/java
-
Hom/Luam/Muab Tshuaj:
sudo cp -r jre-7u45-linux-i586.tar.gz/usr/local/java
-
Hom/Luam/Muab Tshuaj:
cd/usr/zos/java
-
-
Oracle Java 64-ntsis teeb tsa kev qhia ntawm Linux Ubuntu 64-ntsis:
-
Hom/Luam/Muab Tshuaj:
cd ~/Rub tawm
-
Yog tias koj tau rub tawm JDK, Hom/Copy/Paste:
sudo cp -r jdk-7u45-linux-x64.tar.gz/usr/local/java
-
Lossis, yog tias koj tau rub tawm JRE, Hom/Copy/Paste:
sudo cp -r jre-7u45-linux-x64.tar.gz/usr/local/java
-
Hom/Luam/Muab Tshuaj:
cd/usr/zos/java
-
Kauj Ruam 6. Qhib compressed Java binary rau hauv phau ntawv teev npe/usr/local/java
-
Qhia rau txhim kho Oracle Java 32-ntsis ntawm Linux Ubuntu 32-ntsis:
-
Hom/Luam/Muab Tshuaj:
sudo tar xvzf jdk-7u45-linux-i586.tar.gz
-
Hom/Luam/Muab Tshuaj:
sudo tar xvzf jre-7u45-linux-i586.tar.gz
-
-
Oracle Java 64-ntsis teeb tsa kev qhia ntawm Linux Ubuntu 64-ntsis:
-
Yog tias koj tau rub tawm JDK, Hom/Copy/Paste:
sudo tar xvzf jdk-7u45-linux-x64.tar.gz
-
Lossis yog tias koj tau rub tawm JRE, Hom/Copy/Paste:
sudo tar xvzf jre-7u45-linux-x64.tar.gz
-
Kauj Ruam 7. Txheeb xyuas koj phau ntawv teev npe dua
Txij ntawm no mus, koj yuav tsum muaj phau ntawv teev npe tsis sib thooj hauv/usr/local/java rau Java JDK/JRE uas hais tias:
-
Hom/Luam/Muab Tshuaj:
ls -ib
- jdk1.7.0_45
- los yog jre1.7.0_45
Kauj Ruam 8. Kho qhov system PATH file /etc /profile thiab ntxiv cov kab ke hauv qab no rau koj txoj hauv kev
Siv nano, gedit, lossis lwm tus ntawv sau, thiab qhib /etc /profile li hauv paus (hauv paus).
-
Hom/Luam/Muab Tshuaj:
sudo gedit /etc /profile
- los yog
-
Hom/Luam/Muab Tshuaj:
sudo nano /thiab /profile
Kauj Ruam 9. Qhib mus rau hauv qab ntawm cov ntawv siv cov xub tuav thiab ntxiv kab hauv qab no kawg ntawm koj /etc /profile file:
-
Yog tias koj muaj JDK teeb tsa, Hom/Luam/Muab Tshuaj txhuam:
JAVA_HOME =/usr/zos/java/jdk1.7.0_45
JRE_HOME = $ JAVA_HOME/jre
PATH = $ PATH: $ JAVA_HOME/bin: $ JRE_HOME/bin
export JAVA_HOME
export JRE_HOME
export PAJ
-
Lossis yog tias koj muaj JRE teeb tsa, Hom/Copy/Paste:
JRE_HOME =/usr/zos/java/jre1.7.0_45
PATH = $ PATH: $ JRE_HOME/bin
export JRE_HOME
export PAJ
- Txuag cov ntaub ntawv /etc /profile thiab tawm.
Kauj Ruam 10. Qhia qhov chaw ntawm Oracle JDK/JRE rau Ubuntu Linux system
Yog li, lub kaw lus yuav ceeb toom tias Oracle Java version tshiab muaj.
-
Yog tias koj muaj JDK teeb tsa, Hom/Luam/Muab Tshuaj txhuam:
sudo hloov kho-hloov pauv-nruab "/usr/bin/java" "java" "/usr/local/java/jdk1.7.0_45/jre/bin/java" 1
-
Lossis, Yog tias koj muaj JRE teeb tsa, Hom/Copy/Paste:
sudo hloov kho-hloov pauv-nruab "/usr/bin/java" "java" "/usr/local/java/jre1.7.0_45/bin/java" 1
Cov lus txib no yuav ceeb toom rau lub system tias Oracle Java JRE tab tom ua haujlwm
-
Tsuas yog tias koj muaj JDK teeb tsa, Hom/Copy/Paste:
sudo hloov tshiab-lwm -install "/usr/bin/java" "java" "/usr/local/java/jdk1.7.0_45/bin/java" 1
Cov lus txib no qhia koj tias Oracle Java JDK tau npaj los siv
-
Hom/Luam/Muab Tshuaj:
sudo hloov kho-hloov pauv-nruab "/usr/bin/javaws" "javaws" "/usr/local/java/jre1.7.0_45/bin/javaws" 1
cov lus txib no ceeb toom rau lub system tias Oracle Java Web pib tau pib thiab ua haujlwm
Kauj Ruam 11. Qhia Linux Ubuntu tias Oracle Java JDK/JRE yuav tsum yog Java default
-
Yog tias koj muaj JDK teeb tsa, Hom/Luam/Muab Tshuaj txhuam:
sudo hloov tshiab-lwm -set java /usr/local/java/jdk1.7.0_45/jre/bin/java
-
Lossis yog tias koj muaj JRE teeb tsa, Hom/Copy/Paste:
sudo hloov tshiab-lwm -set java /usr/local/java/jre1.7.0_45/bin/java
Cov lus txib no yuav teeb tsa JRE (Java Runtime Environment) rau lub kaw lus
-
Tsuas yog tias koj muaj JDK teeb tsa, Hom/Copy/Paste:
sudo hloov tshiab-lwm -set java /usr/local/java/jdk1.7.0_45/bin/java
Cov lus txib no yuav teeb Java compiler rau cov kab ke
- Yog tias koj muaj JDK teeb tsa, Hom/Copy/Paste sudo hloov tshiab-lwm -set javaws /usr/local/java/jdk1.7.0_45/bin/javaws
-
Lossis, yog tias koj muaj JRE teeb tsa, Hom/Copy/Paste:
sudo hloov tshiab-lwm -set javaws /usr/local/java/jre1.7.0_45/bin/javaws
Cov lus txib no yuav teeb Web pib Java rau lub kaw lus
Kauj Ruam 12. Rov qab qhib koj qhov system dav PATH /etc /profile los ntawm kev ntaus cov lus txib hauv qab no:
-
Hom/Luam/Muab Tshuaj:
. /thiab/profile
- Nco ntsoov tias koj cov kab ke thoob plaws PATH /etc /profile cov ntaub ntawv yuav rov pib dua tom qab Linux Ubuntu tau rov pib dua.
Kauj Ruam 13. Kuaj yog tias Oracle Java raug teeb tsa raug rau koj li kab ke
Khiav cov lus txib hauv qab no thiab nco ntsoov Java version: Qhov tseeb 32-ntsis Oracle Java teeb tsa yuav tshwm:
-
Hom/Luam/Muab Tshuaj:
java -version. Cov lus txib no qhia txog Java version uas lub kaw lus ua haujlwm. Koj yuav tsum pom cov lus uas hais tias: java version "1.7.0_45"
Java (TM) SE Runtime Environment (tsim 1.7.0_45-b18)
- Java HotSpot (TM) Server VM (tsim 24.45-b08, hom sib xyaw)
-
Hom/Luam/Muab Tshuaj:
java -version. Cov lus txib no qhia koj tias tam sim no koj tuaj yeem sau Java cov haujlwm los ntawm lub davhlau ya nyob twg. Koj yuav pom cov lus uas hais tias: java 1.7.0_45. Kev ua tiav kev teeb tsa ntawm Oracle Java 64-ntsis yuav tso tawm:
-
Hom/Luam/Muab Tshuaj:
java -version. Cov lus txib no qhia txog Java version uas lub kaw lus ua haujlwm. Koj yuav pom cov lus uas hais tias: java version "1.7.0_45"
Java (TM) SE Runtime Environment (tsim 1.7.0_45-b18)
- Java HotSpot (TM) 64-Bit Server VM (tsim 24.45-b08, hom sib xyaw)
-
Hom/Luam/Muab Tshuaj:
java -version. Cov lus txib no qhia koj tias tam sim no koj tuaj yeem sau Java cov haujlwm los ntawm lub davhlau ya nyob twg. Koj yuav tsum pom cov lus uas hais tias: java 1.7.0_45
Kauj Ruam 14. Nrog koj zoo siab, koj tau teeb tsa Oracle Java ntawm koj li Linux system
Tam sim no, rov pib dua koj lub Linux Ubuntu. Tom qab ntawd, koj lub kaw lus yuav raug teeb tsa kom khiav thiab txhim kho Java cov haujlwm.
Txoj Kev 1 ntawm 3: Tsis teb los tau: Yuav ua li cas qhib Oracle Java hauv Web Browser
Kauj Ruam 1. Pab kom Java plug-ins hauv koj lub vev xaib los ntawm kev tsim lub cim txuas los ntawm qhov browser plug-in directory mus rau Java plug-in qhov chaw nyob hauv Oracle Java faib
-
Cov Ntaub Ntawv Tseem Ceeb:
Kuv pom zoo kom ceev faj thaum ua haujlwm Oracle Java 7 hauv lub vev xaib vim tias muaj ntau qhov tsis raug hais txog kev nyab xeeb thiab siv tsis tau. Hauv qhov tseeb, yog tias koj pab kom Oracle Java 7 hauv koj lub vev xaib, cov neeg siab phem tuaj yeem nkag thiab ua rau koj lub computer puas tsuaj los ntawm kev siv nws qhov tsis raug thiab cov ntsiab lus tsis muaj zog. Yog xav paub ntxiv, mus ntsib Java Tester
Txoj kev 2 ntawm 3: Google Chrome
Phau ntawv qhia rau Oracle Java 32-ntsis:
Kauj Ruam 1. Nkag mus rau cov lus txib hauv qab no
-
Hom/Luam/Muab Tshuaj:
sudo mkdir -p/opt/google/chrome/plugins
Cov npe hu ua/opt/google/chrome/plugins yuav raug tsim
-
Hom/Luam/Muab Tshuaj:
cd/opt/google/chrome/plugins
Cov lus txib no yuav hloov koj mus rau Google Chrome phau ntawv qhia ntxiv-ons, yog li xyuas kom koj nyob hauv cov npe ua ntej lub cim txuas
-
Hom/Luam/Muab Tshuaj:
sudo ln -s /usr/local/java/jre1.7.0_45/lib/ib 386/libnpjp2.so
Cov lus txib no yuav tsim lub cim txuas los ntawm JRE Java (Java Runtime Environment) plugin libnpjp2.so rau koj Google Chrome.
Phau ntawv qhia rau Oracle Java 64-ntsis:
Kauj Ruam 1. Nkag mus rau cov lus txib hauv qab no
-
Hom/Luam/Muab Tshuaj:
sudo mkdir -p/opt/google/chrome/plugins
Cov npe npe/opt/google/chrome/plugins yuav raug tsim
-
Hom/Luam/Muab Tshuaj:
cd/opt/google/chrome/plugins
Cov lus txib no yuav hloov koj mus rau Google Chrome phau ntawv qhia ntxiv-ons, yog li ua kom ntseeg tau tias koj nyob hauv phau ntawv teev npe ua ntej tsim cov cim txuas
-
Hom/Luam/Muab Tshuaj:
sudo ln -s /usr/local/java/jre1.7.0_45/lib/amd64 ua/libnpjp2.so
Cov lus txib no yuav tsim lub cim txuas los ntawm Java JRE (Java Runtime Environment) ntxiv-on libnpjp2.so mus rau Google Chrome.
Nco ntsoov:
Kauj Ruam 1. Nco tseg:
Qee zaum thaum koj nkag mus rau cov lus txib saum toj no, cov lus yuav tshwm sim hais tias:
- ln: tsim cov cim txuas `./libnpjp2.so ': Cov ntaub ntawv muaj nyob
- Txhawm rau kho qhov teeb meem no, yooj yim tshem tawm cov cim txuas yav dhau los siv cov lus txib hauv qab 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 directory ua ntej koj nkag mus rau qhov hais kom ua
Kauj Ruam 2. Rov pib lub web browser thiab mus rau Java Tester los sim seb Java puas ua haujlwm tau zoo hauv lub vev xaib
Txoj Kev 3 ntawm 3: Mozilla Firefox
Oracle Java 32-ntsis Qhia:
Kauj Ruam 1. Nkag mus rau cov lus txib hauv qab no
-
Hom/Luam/Muab Tshuaj:
cd/usr/lib/mozilla/plugins
Cov lus txib no yuav hloov koj mus rau/usr/lib/mozilla/plugins cov npe, tsim cov npe no yog tias nws tsis tau muaj
-
Hom/Luam/Muab Tshuaj:
sudo mkdir -p/usr/lib/mozilla/plugins
Cov lus txib no yuav tsim cov npe/usr/lib/mozilla/plugins, yog li ua kom ntseeg tau tias koj nyob hauv cov npe no ua ntej tsim cov cim txuas
-
Hom/Luam/Muab Tshuaj:
sudo ln -s /usr/local/java/jre1.7.0_45/lib/ib 386/libnpjp2.so
Cov lus txib no yuav tsim lub cim txuas los ntawm Java JRE (Java Runtime Environment) ntxiv-on libnpjp2.so rau koj Mozilla Firefox
Kauj ruam 2. ==== Qhia rau Oracle Java 64-ntsis:
====
Kauj Ruam 3. Nkag mus rau cov lus txib hauv qab no
-
Hom/Luam/Muab Tshuaj:
cd/usr/lib/mozilla/plugins
Cov lus txib no yuav hloov koj mus rau/usr/lib/mozilla/plugins cov npe, tsim cov npe no yog tias nws tsis tau muaj
-
Hom/Luam/Muab Tshuaj:
sudo mkdir -p/usr/lib/mozilla/plugins
Cov lus txib no yuav tsim cov npe/usr/lib/mozilla/plugins, yog li ua kom ntseeg tau tias koj nyob hauv cov npe no ua ntej tsim cov cim txuas
-
Hom/Luam/Muab Tshuaj:
sudo ln -s /usr/local/java/jre1.7.0_45/lib/amd64 ua/libnpjp2.so
Cov lus txib no yuav tsim lub cim txuas los ntawm Java JRE (Java Runtime Environment) ntxiv-on libnpjp2.so mus rau Mozilla Firefox.
Nco ntsoov:
Kauj Ruam 1. Nco tseg:
Qee zaum, thaum koj nkag mus rau cov lus txib saum toj no, cov lus hauv qab no yuav tshwm sim:
- ln: tsim cov cim txuas `./libnpjp2.so ': Cov ntaub ntawv muaj nyob
- Txhawm rau kho qhov teeb meem no yooj yim tshem tawm cov cim txuas yav dhau los siv cov lus txib hauv qab 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 cov npe ua ntej nkag mus rau qhov hais kom ua.
Kauj ruam 2. Rov pib dua koj lub vev xaib thiab mus rau Java Tester site los ntsuas yog Java ua haujlwm tau zoo hauv lub vev xaib
Lub tswv yim
- Txhawm rau siv Ubuntu Linux, koj tuaj yeem xaiv siv OpenJDK, uas yog pub dawb thiab qhib qhov kev siv ntawm Java programming lus, lossis siv Oracle Java JDK lossis JRE. Qee tus neeg nyiam Oracle Java (vim nws yog qhov hloov tshiab tshaj plaws ntawm Java thiab muab ncaj qha los ntawm Java thev naus laus zis tus tswj), tab sis xaiv raws li koj nyiam.
- Nco ntsoov tias Oracle hloov kho kev nyab xeeb, kho kab, thiab teeb tsa kev ua haujlwm zoo txhua lub sijhawm nws tshaj tawm Oracle Java tshiab. Thaum txhim kho Oracle Java rau hauv kab ke, nco ntsoov tias koj paub tus lej version.
- Nco ntsoov tias daim ntawv no tau hloov kho ib ntus raws li Oracle qee zaum hloov pauv li cas JDK/JRE binary raug teeb tsa.