Dab noj hnub yog ib qho ntawm kev nyiam tshaj plaws ib puag ncig rau Java. Qhov kev pabcuam no muab txhua yam koj xav tau los tsim Java project los ntawm kos. Ua ntej koj pib ua haujlwm tshiab, koj yuav tsum xub tsim ib qhov project. Tus txheej txheem ntawm tsim txoj haujlwm tshiab hauv Eclipse yog qhov yooj yim heev. Txawm li cas los xij, yog tias koj nruab Eclipse rau program hauv lwm yam lus, koj yuav tsis meej pem.
Kauj ruam
Kauj Ruam 1. Nruab Eclipse IDE rau Java Developers
Thaum txhim kho Eclipse thawj zaug, koj tau txais kev xaiv los xaiv IDE (kev txhim kho ib puag ncig ib puag ncig). Hauv qhov kev xaiv ntawd, xaiv "Eclipse IDE rau Java Developers". Qhov kev zov me nyuam yuav teeb tsa cov ntaub ntawv thiab cov cuab yeej xav tau los tsim qhov project Java.
Yog tias koj nruab Eclipse rau program hauv lwm yam lus, koj tuaj yeem ntxiv kev txhawb nqa rau Java los ntawm hauv daim ntawv thov. Nyem rau "Help" menu> "Install New Software", tom qab ntawv xaiv "Txhua Qhov Chaw Muaj" los ntawm "drop-down" menu. Nkag mus "java" hauv "Filter" teb, thiab kos rau "Eclipse Java Development Tools" lub thawv. Tom qab ntawd, nyem "Tom ntej". Ua raws li cov lus qhia ntawm lub vijtsam txhawm rau rub tawm thiab teeb tsa Java cov cuab yeej. Thaum qhov kev teeb tsa tiav, Dab noj hnub yuav rov pib dua
Kauj Ruam 2. Nyem "File" → "New" → "Java Project"
Qhov no yuav qhib "New Java Project" qhov rai.
Yog tias koj tsis pom qhov "Java Project" xaiv txawm tias koj muaj Java Development Tools teeb tsa, nyem "Tshiab"> "Projects …", tom qab ntawv qhib "Java" nplaub tshev thiab xaiv "Java Project"
Kauj Ruam 3. Npe lub phiaj xwm
Lub npe no tsis tas yuav zoo ib yam li qhov program lub npe kawg, tab sis nws yuav tsum pab koj thiab koj cov npoj yaig txheeb xyuas qhov haujlwm.
Kauj Ruam 4. Xaiv qhov chaw khaws cov ntaub ntawv ua haujlwm
Los ntawm lub neej ntawd, cov ntaub ntawv yuav raug cawm hauv Eclipse directory. Yog tias koj xav tau, koj tuaj yeem txuag cov ntawv hauv qhov chaw koj xaiv.
Kauj Ruam 5. Yog tias koj tab tom ua haujlwm rau tshwj xeeb Java Runtime Environment (JRE) version, xaiv JRE version uas koj xav siv los ntawm cov ntawv qhia zaub mov nco-down
Feem ntau, qhov tseeb JRE version yuav raug xaiv.
Kauj Ruam 6. Xaiv qhov txheej txheem txheej txheem txheej txheem
Koj tuaj yeem siv tag nrho "phiaj xwm" nplaub tshev, lossis tsim cov kev cai "cov peev txheej" thiab "chav kawm" cov ntawv tais ceev tseg. Los ntawm lub neej ntawd, "Xaiv cov ntawv cais …" xaiv yuav raug xaiv. Txawm li cas los xij, koj yuav xav tau kho cov kev xaiv no raws li qhov xav tau ntawm txoj haujlwm.
Kauj Ruam 7. Nyem "Tom ntej" qhib qhov "Java Settings" window
Hauv lub qhov rai no, koj tuaj yeem ntxiv cov peev txheej ntxiv thiab cov tsev qiv ntawv rau txoj haujlwm.
Kauj Ruam 8. Siv Qhov Chaw tab los hais qhia txoj hauv kev, uas tus neeg sau ntawv yuav siv los sau cov haujlwm
Koj tuaj yeem tsim cov ntawv txuas ntxiv, txuas cov peev txheej sab nraud, thiab ntxiv thiab tshem cov ntawv tais ceev tseg los ntawm txoj hauv kev tsim. Tus compiler yuav siv txoj hauv kev los txiav txim siab qhov chaw los ua ke.
Kauj Ruam 9. Siv Libraries tab ntxiv cov tsev qiv ntawv rau txoj haujlwm
Cov ntawv no tso cai rau koj suav nrog JAR cov ntaub ntawv lossis cov tsev qiv ntawv rau koj qhov haujlwm. Los ntawm kev xa cov ntaub ntawv JAR, koj tuaj yeem siv cov tsev qiv ntawv los ntawm lwm qhov haujlwm.
Kauj Ruam 10. Nyem "Tiav" kom pib ua haujlwm ntawm qhov haujlwm
Tom qab nyem "Ua tiav", koj yuav raug coj mus rau nplooj ntawv ua haujlwm. Yog tias koj siv Eclipse los ua haujlwm lwm yam lus, koj yuav raug hais kom hloov mus rau Java kev xav. Cov theem no tau pom zoo kom tau txais txiaj ntsig ntau tshaj ntawm IDE.
- Koj qhov haujlwm yuav tshwm nyob rau hauv "Pob Explorer" bar ntawm sab laug ntawm qhov screen. Yog tias koj pom Eclipse Txais tos tab, nyem me ntsis Java khawm ntawm sab laug ntawm lub qhov rais.
- Nyeem cov lus qhia ntxaws hauv qab no los tsim koj thawj Java program.