Thaum koj qhov haujlwm Java xav tau JAR (Java Archive) lub tsev qiv ntawv kom ua haujlwm, koj yuav tsum teeb tsa nws kom suav nrog lub tsev qiv ntawv hauv nws txoj kev tsim. Ua tsaug rau Dab noj hnub, txheej txheem no yooj yim thiab nco tau yooj yim. Kab lus no npog Java Dab noj hnub - Ganymede 3.4.0.
Kauj ruam
Txoj Kev 1 ntawm 2: Ntxiv Sab Hauv JAR
Kauj Ruam 1. Luam JAR uas yuav siv rau koj txoj haujlwm
Nov yog yuav ua li cas:
-
Tsim daim nplaub tshev hu ua lib hauv koj qhov project. "Lib" txhais tau tias tsev qiv ntawv thiab tuav tag nrho JARs uas yuav siv rau txoj haujlwm no.
-
Luam qhov xav tau JAR mus rau lib.
-
Rov qab ua dua koj txoj haujlwm los ntawm txoj cai-txhaj rau lub npe project thiab xaiv Refresh. Cov ntawv tais ceev tseg lib yuav tam sim no tuaj yeem pom hauv dab noj hnub nrog txhua JARs hauv nws.
Kauj Ruam 2. Ua kom tiav ib qho ntawm cov hauv qab no los teeb tsa koj txoj hauv kev
Txoj Kev 1
Kauj Ruam 1. Tsim lib hauv dab noj hnub thiab xaiv txhua qhov JAR uas xav tau
Kauj Ruam 2. Txoj nyem rau ntawm JAR thiab mus rau Txoj Kev Tsim
Kauj Ruam 3. Xaiv Ntxiv rau Tsim Txoj Hauv Kev
JAR yuav ploj mus lib thiab rov tshwm sim hauv Cov tsev qiv ntawv hais txog.
Txoj kev 2
Kauj Ruam 1. Txoj nyem rau ntawm lub npe project thiab mus rau Build Path
Kauj ruam 2. Xaiv Configure Build Path
.. thiab qhov phiaj xwm qhov cuab yeej qhov rai yuav tshwm uas qhia koj tsim txoj hauv kev.
Kauj Ruam 3. Xaiv daim ntawv lo Tsev qiv ntawv
Kauj Ruam 4. Nyem Ntxiv JARs
..
Kauj Ruam 5. Nrhiav thiab xaiv qhov JAR xav tau thiab nyem OK
Tam sim no JAR yuav tshwm nyob rau hauv cov npe hauv txoj kev tsim.
Kauj Ruam 6. Nyem OK kom kaw qhov khoom qhov rai
JAR yuav tam sim no Cov Tsev Qiv Ntawv hais txog es tsis txhob lib.
Txoj Kev 2 ntawm 2: Ntxiv JAR Sab Nraud
Nco tseg: Nws zoo dua uas koj hais txog JAR uas twb muaj lawm hauv koj txoj haujlwm lossis lwm qhov haujlwm. Qhov no tso cai rau koj los tshuaj xyuas txhua qhov kev vam khom rau koj li kev tswj hwm version (koj yuav tsum siv kev tswj hwm version).
Siv ib txoj hauv kev hauv qab no.
Txoj Kev 1
Nov yog txoj hauv kev pom zoo vim nws tso cai rau cov tsim tawm sib txawv ntawm cov haujlwm zoo sib xws los nrhiav lawv cov JARs sab nraud hauv ntau qhov chaw.
Kauj Ruam 1. Txoj nyem rau ntawm lub npe project thiab mus rau Build Path
Kauj Ruam 2. Xaiv Configure Build Path
.. thiab qhov phiaj xwm qhov cuab yeej qhov rai yuav tshwm uas qhia koj tsim txoj hauv kev.
Kauj Ruam 3. Nyem Ntxiv Qhov Hloov Pauv
..
Kauj Ruam 4. Nyem Configure Variables
..
Kauj Ruam 5. Nyem Tshiab
..
Kauj Ruam 6. Ntaus lub npe rau qhov hloov pauv tshiab
Piv txwv, yog tias tag nrho cov JAR no yog rau Tomcat, peb pom zoo kom ntaus TOMCAT_JAR.
Kauj Ruam 7. Mus rau phau ntawv teev npe uas tuav JAR rau txoj kev (koj tseem tuaj yeem xaiv cov ntaub ntawv JAR tshwj xeeb rau qhov sib txawv)
Kauj Ruam 8. Nyem Ok txhawm rau txheeb xyuas qhov sib txawv
Kauj Ruam 9. Nyem Ok kaw qhov kev nyiam sib tham
Kauj Ruam 10. Xaiv qhov sib txawv los ntawm daim ntawv teev npe
Kauj Ruam 11. Nyem rau Txuas Ntxiv
..
Kauj Ruam 12. Xaiv JAR koj xav ntxiv rau chav kawm
Kauj Ruam 13. Nyem Ok kom kaw qhov kev sib tham
Kauj Ruam 14. Nyem Ok txhawm rau kaw qhov kev sib tham hauv chav kawm sib txawv tshiab
Kauj Ruam 15. Nyem Ok txhawm rau kaw txoj kev teeb tsa kev sib tham
-
Yog tias koj qhia qhov haujlwm no nrog lwm tus neeg, lawv yuav tsum tau piav qhia qhov txawv. Lawv tuaj yeem txiav txim siab nws los ntawm
'' '' Window-> Preferences-> Java-> Build Path-> Classpath Variables '' ''
Txoj kev 2
Nco ntsoov tias yog koj siv txoj hauv kev no, sab nraud JAR yuav tsum nyob hauv tib qho chaw ntawm lub zog tsav zoo li txhua tus siv txoj haujlwm no. Qhov no ua rau sib koom cov phiaj xwm nyuaj dua.
Kauj Ruam 1. Txoj nyem rau ntawm lub npe project thiab mus rau Build Path
Kauj Ruam 2. Xaiv Ntxiv Cov Ntawv Sab Nraud
..
Kauj Ruam 3. Nrhiav thiab xaiv qhov JAR xav tau thiab nyem Qhib
JAR yuav tshwm sim hauv Cov Tsev Qiv Ntawv hais txog.
Txoj Kev 3
Nco ntsoov tias yog koj siv txoj hauv kev no, sab nrauv JAR yuav tsum nyob hauv tib qho chaw ntawm lub zog tsav raws li txhua tus siv txoj haujlwm no. Qhov no ua rau sib koom cov phiaj xwm nyuaj dua.
Kauj Ruam 1. Txoj nyem rau ntawm lub npe project thiab mus rau Build Path
Kauj ruam 2. Xaiv Configure Build Path
.. thiab qhov phiaj xwm qhov cuab yeej qhov rai yuav tshwm rau hauv koj txoj kev teeb tsa.
Kauj Ruam 3. Xaiv daim ntawv lo Tsev qiv ntawv
Kauj Ruam 4. Nyem rau Ntxiv Cov JARs Sab Nraud
..
Kauj Ruam 5. Nrhiav thiab xaiv qhov JAR xav tau thiab nyem Qhib
Tam sim no JAR yuav tshwm nyob rau hauv cov npe ntawm cov tsev qiv ntawv hauv txoj kev tsim.
Kauj Ruam 6. Nyem OK txhawm rau kaw lub qhov rai khoom
Tam sim no JAR yuav nyob sab hauv Cov tsev qiv ntawv hais txog.
Lub tswv yim
- Thaum twg los xij koj ntxiv cov ntaub ntawv tshiab lossis cov ntawv tais ceev tseg rau ib qhov haujlwm hauv Eclipse los ntawm lwm yam uas tsis yog Eclipse, koj yuav tsum rov ua dua (rov ua dua tshiab) qhov haujlwm txuas rau ceeb toom Eclipse tias cov ntaub ntawv tshiab nyob ntawd. Txwv tsis pub, koj yuav ntsib cov neeg sau lossis tsim txoj hauv kev tsis raug.
- Txawm hais tias sab hauv JAR ploj los ntawm lib, cov ntaub ntawv tseem nyob hauv cov ntaub ntawv kaw lus. Nov tsuas yog Dab noj hnub txoj kev qhia koj tias JAR cov ntaub ntawv tau ntxiv.
-
Txhawm rau kom muaj kev nyab xeeb, peb pom zoo kom koj tsim daim nplaub tshev los sau koj cov cai. Nov yog li cas:
- Txoj cai-nyem rau. JAR hauv Cov Tsev Qiv Ntawv Siv hauv pob tshawb nrhiav.
- Xaiv daim ntawv Javadoc thiab ntaus nws hauv daim nplaub tshev (lossis URL) qhov twg koj cov ntaub ntawv nyob. (Nco tseg: Dab noj hnub yuav tsis nyiam qhov no thiab koj qhov kev lees paub yuav ua tiav. Tsis txhob txhawj xeeb txawm tias nws tseem yuav ua haujlwm).
- Xaiv Java Source Attachment thiab nrhiav cov ntawv tais ceev tseg lossis. JAR cov ntaub ntawv uas muaj koj li peev txheej.