Nrog Java, koj tuaj yeem ua haujlwm hla cov ntawv thov ntawm Mac OS-X, Linux, thiab Windows (nrog rau lwm yam kev ua haujlwm) tsis tas yuav hloov kho lawv. Koj tuaj yeem nruab Java ntawm GNU/Linux tshuab yooj yim thiab tseem muaj ntau txoj hauv kev rau cov neeg siv nrog kev paub txuj ci me ntsis. Tsuas yog vim koj muaj lub khoos phis tawj Linux, tsis tau txhais hais tias koj yuav tsum plam daim ntawv thov zoo!
Kauj ruam
Txoj Kev 1 ntawm 5: Txhim Kho Java (Tsis-RPM Txoj Kev)
Nov yog ib txoj hauv kev uas tseem tuaj yeem ua haujlwm ntawm GNU/Linux clones uas tsis txhawb nqa RPM. Txoj kev no tsis xav tau kev tso cai los ntawm tus tswj hwm lub computer thiab koj tuaj yeem teeb tsa ntau yam Java ntawm ib lub computer.
Kauj Ruam 1. Rub tawm JDK
- Nyem rau qhov "Rub tawm" txuas rau saum Java Platform (JDK) 7u9.
- Txais daim ntawv tso cai thiab mus rau kauj ruam tom ntej.
Kauj Ruam 2. Xaiv txoj cai rub tawm cov ntawv
Hauv qab "Cov Khoom/Cov Ntaub Ntawv Qhia" koj yuav tsum xaiv Linux kev xaiv uas haum rau koj lub khoos phis tawj. Piv txwv li, yog tias koj tab tom khiav Linux x86 (32 ntsis), koj yuav tsum xaiv "*.tar.gz" version.
Kauj Ruam 3. Rub tawm cov ntawv hauv.gz hom ntawv
Txuag cov ntaub ntawv hauv koj lub tshuab GNU/Linux.
Kauj Ruam 4. Qhib phau ntawv teev npe qhov chaw khaws cov ntaub ntawv rub tawm
Koj tsis tas yuav muaj hauv paus (tus neeg siv uas muaj kev nkag tau mus rau lub khoos phis tawj), koj tsuas yog xav tau nkag mus rau cov npe uas koj yuav siv los khaws Java cov haujlwm. Yog tias koj tus thawj tswj hwm tsis txhawb nws, koj tuaj yeem txuag Java hauv Cov npe hauv tsev lossis (zoo dua) Cov Npe Sib Koom Network.
Kauj Ruam 5. Qhib cov ntawv rub tawm
Piv txwv li, koj tuaj yeem ua qhov no hauv koj phau ntawv teev npe Tsev. Qhib cov ntaub ntawv yuav tsim cov npe tshiab npe "jdk1.7.0_09". Tam sim no, Java tau teeb tsa.
- Java JRE yog dawb dua thiab tuaj yeem txav tau yooj yim los ntawm ib qho mus rau lwm qhov los ntawm kev luam theej tag nrho cov ntawv.
- Koj tuaj yeem nruab JREs sib txawv li no. JREs hauv ntau qhov sib txawv tuaj yeem ua haujlwm ua ke thiab tuaj yeem siv tau yog tias muaj software uas xav tau cov ntawv qub los ua haujlwm.
Kauj Ruam 6. Khiav Java
Java cov haujlwm uas koj tuaj yeem ua tau yog nyob hauv cov npe me me hu ua "bin". Txoj kev teeb tsa no yuav tsis tsim cov lus Java ib txwm siv. Koj yuav tsum ua qhov no los yog ib txwm suav nrog tag nrho txoj hauv kev hauv koj cov ntawv sau pib.
Txoj Kev 2 ntawm 5: Txoj Cai RPM
Txoj hauv kev no yog txoj hauv kev "raug dua" los teeb tsa Java vim nws tso cai rau lub installer los tshuaj xyuas qhov tsis txaus ntseeg ntawm lub tsev qiv ntawv. Txawm li cas los xij, txoj hauv kev no tsis siv rau txhua qhov hloov pauv thiab qee qhov yuav ua tsis tiav txawm tias nyob hauv cov tshuab uas txhawb nqa RPM. (Txawm hais tias tam sim no Java installer muaj ntau tus kheej thiab cov kev xav tau feem ntau tsawg.)
Kauj Ruam 1. Rub tawm JDK
- Nyem rau qhov "Rub tawm" txuas rau saum Java Platform (JDK) 7u9.
- Txais daim ntawv tso cai thiab mus rau kauj ruam tom ntej.
Kauj Ruam 2. Xaiv txoj cai rub tawm cov ntawv
Hauv qab "Cov Khoom/Cov Ntaub Ntawv Qhia" koj yuav tsum xaiv Linux kev xaiv uas haum rau koj lub khoos phis tawj. Piv txwv li, yog tias koj tab tom khiav Linux x86 (32 ntsis), koj yuav tsum xaiv "*.rpm" version, piv txwv li "jdk-7u9-linux-i586.rpm".
Kauj Ruam 3. Rub cov ntawv.rpm
Txuag cov ntawv rau hauv koj lub tshuab GNU/Linux.
Kauj Ruam 4. Nkag mus rau hauv paus thiab mus rau phau ntawv teev npe qhov twg cov ntaub ntawv rub tawm tau khaws cia
Koj kuj tseem tuaj yeem dhau los ntawm kev siv SU thiab nkag mus rau tus lej superuser.
Kauj Ruam 5. Nruab RPM cov ntaub ntawv
Ntaus rpm -ivh filename.rpm qhov twg filename yog lub npe ntawm koj cov ntaub ntawv.rpm (Zoo li jdk-7u9-linux-i586.rpm).
- Koj tuaj yeem tau txais cov lus hais tias qhov program "rpm" tsis tau teeb tsa.
- Yog tias qhov teeb meem yog qhov program "rpm" tsis tau teeb tsa, koj yuav tsum tau teeb tsa nws los ntawm kev ntaus sudo apt-get install rpm. Nkag mus rau koj tus password thiab qhov program tau npaj los khiav.
Kauj Ruam 6. Tsim lub cim txuas
Yog tias koj xav khiav qhov version ntawm Java tus neeg txhais lus lossis tus neeg sau los ntawm cov npe uas twb muaj lawm ntawm koj li GNU/Linux system, koj yuav tsum tsim qee cov cim txuas:
- sudo ln -s -v jdk1.7.0_09/bin/java/usr/bin/java
- sudo ln -s -v jdk1.7.0_09/bin/javac/usr/bin/javac
- Nco ntsoov, nrog txoj hauv kev no, koj yuav pom qhov cuam tshuam tawg. Nws zoo dua los siv pob khoom teeb tsa uas tuaj yeem lis txhua qhov kev cia siab vim tias koj tsis tuaj yeem siv Java kom txog thaum txhua qhov kev ua tsis ncaj ncees tau ua.
Txoj Kev 3 ntawm 5: Txhim Kho Java ntawm Ubuntu Siv GUI Tus Thawj Tswj Pob
Kauj Ruam 1. Qhib tus thawj tswj pob
Koj kuj tseem tuaj yeem siv Synaptic lossis Adept Manager.
Kauj Ruam 2. Nruab Qhib JDK
Java JDK thiab JRE tsis muaj rau kev teeb tsa ntawm GUI Tus Thawj Tswj Pob. Hloov chaw, koj yuav tsum teeb tsa Qhib JDK.
- Tshawb nrhiav rau openjdk-7-jdk.
- Xaiv openjdk-7-jdk rau kev teeb tsa. Nyob ntawm tus thawj tswj hwm pob uas twb muaj lawm, koj yuav raug hais kom xaiv los teeb tsa qhov yuav tsum tau muaj kev vam khom lossis tus tswj hwm pob yuav cia li xaiv qhov xav tau kev tso cai yam tsis muaj kev lees paub. Piv txwv li, "openjdk-7-jre" twb tau xaiv los ntawm Synaptic Package Manager. Yog tias koj xav siv Java ua lub plugin hauv koj tus browser, xaiv qhov kev xaiv los nruab "icedtea-7-plugin".
Kauj Ruam 3. Thov hloov pauv
Nyem lub pob kom thov hloov pauv. Nyob ntawm tus tswj hwm pob uas koj siv, lub qhov rai yuav tshwm sim nug koj qhov kev pom zoo los thov hloov pauv.
Kauj Ruam 4. Tos Java rau nruab kom ua tiav
Txoj Kev 4 ntawm 5: Txhim Kho Java ntawm Ubuntu Siv Lub Console
Kauj Ruam 1. Nkag mus rau ib qho ntawm cov lus txib hauv qab no rau hauv koj qhov kev pab cuam console:
- sudo apt-tau nruab openjdk-7-jdk openjdk-7-jre (yog tias koj tsis xav teeb tsa lub plugin ntawm koj tus browser)
- sudo apt-tau nruab openjdk-7-jdk openjdk-7-jre icedtea-7-plugin (yog tias koj xav teeb tsa lub plugin ntawm koj tus browser)
- apt-tau tuaj yeem ua haujlwm tau raws li qhov xav tau thiab muab cov npe hloov pauv rau kev lees paub.
Kauj Ruam 2. Sau y txhawm rau pom zoo kev teeb tsa
Txoj Kev 5 ntawm 5: Ubuntu OpenJDK Txoj Kev Siv Console
Ubuntu tsis txhawb nqa Oracle Java tej pob khoom lawm, tab sis txhawb nqa OpenJDK.
Kauj Ruam 1. Nkag mus rau ib qho ntawm cov lus txib hauv qab no rau hauv koj qhov kev pab cuam console:
- Yog tias koj tsis xav teeb tsa lub plugin hauv koj tus browser: sudo apt-tau nruab openjdk-6-jre.
- Yog tias koj xav teeb tsa plug-in hauv koj tus browser: sudo apt-tau nruab openjdk-6-jre icedtea6-plugin
- Yog tias koj siv server tsis muaj duab thiab xav tau ib puag ncig tshwj xeeb rau kev ua haujlwm daim ntawv thov server (xws li Tomcat lossis Glassfish): sudo apt-get install --no-install-recommend openjdk-6-jre-headless
- Yog tias koj xav tau JDK tag nrho (rau kev sau Java programs): sudo apt-get install openjdk-6-jdk
- apt-tau tuaj yeem ua haujlwm tau raws li qhov xav tau thiab muab cov npe hloov pauv rau kev lees paub.
Kauj Ruam 2. Sau y txhawm rau pom zoo kev teeb tsa
Lub tswv yim
- Txawm hais tias koj tsis paub nrog tus txheej txheem console, nws yooj yim ua dua li GUI txoj kev.
- Yog tias koj pom cov lus qhia ntawm koj kev faib khoom, peb pom zoo siv nws vim tias ntawm qee qhov kev faib khoom uas twb muaj lawm, cov software khaws cia los nrog Java (uas yog rau koj kom zoo dua).
- Nws yooj yim rau teeb tsa los ntawm kev khaws cia dua li rub nws ntawm Oracle site.
- Lwm qhov lus qhia rau kev ua raws nrog txheej txheej txheej txheej rpm yog siv 'rpm -ivv …' uas yuav tua hluav taws tawm cov lus tawm thiab muab ntau cov ntaub ntawv hais txog kev teeb tsa thaum lub sijhawm txheej txheem teeb tsa. Koj tuaj yeem ua tib yam nrog lwm yam haujlwm rpm kom tau txais kev piav qhia ntawm cov haujlwm tam sim no.
- Ntawm Linux Red Hat 8.0, tso Nautilus tus thawj tswj ntaub ntawv, qhib cov npe, thiab nyem rau ntawm rpm cov npe cov ntaub ntawv uas yuav pib txheej txheem teeb tsa. Txawm li cas los xij, txoj hauv kev no tsis ua haujlwm ntxiv ntawm Fedora Core 4 (qhov no tseem tsis tau sim ntawm lwm qhov FC version). Qhov tseeb, yog tias koj ua qhov no, koj yuav tau txais cov lus ceeb toom qhia rau koj tias lub npe cov ntaub ntawv qhia tias cov ntaub ntawv tsis tuaj yeem ua haujlwm txawm tias cov ntsiab lus ntawm cov ntawv yog ntawm "ua haujlwm" hom.