Tom qab ua tiav koj txoj haujlwm hauv Eclipse, koj yuav xav ua kom txoj haujlwm ua tiav daim ntawv thov. Txoj hauv kev yooj yim tshaj plaws thiab feem ntau los ua haujlwm Java yog tsim cov ntaub ntawv EXE los ntawm txoj haujlwm. Kab lus no yuav qhia koj dhau los hloov JAR cov ntaub ntawv rau hauv EXE.
Kauj ruam
Txoj Kev 1 ntawm 3: Xa Cov Ntaub Ntawv los ntawm Dab Neeg
Kauj Ruam 1. Right-click koj qhov project, tom qab ntawd xaiv Refresh lossis nias F5 kom ntseeg tau tias txhua txoj haujlwm txoj cai yog qhov hloov tshiab kawg
Cov kauj ruam no yuav tiv thaiv kev tsis sib haum xeeb thaum koj xa cov ntawv.
Kauj ruam 2. Right-click koj qhov project, tom qab ntawd nyem Export
Kauj Ruam 3. Qhib Java nplaub tshev, tom qab ntawd ob npaug nyem rau ntawm Runnable JAR cov ntaub ntawv xaiv
Kauj Ruam 4. Teeb JAR cov ntaub ntawv tshwj xeeb
Xaiv cov chav kawm tseem ceeb (chav kawm nrog txoj hauv kev tseem ceeb) los ntawm Launch configuration menu.
- Tom qab ntawd, xaiv Cov Ntawv Qhia Chaw Xa Ntawv los ntawm Browse khawm, lossis nkag mus rau qhov koj xav tau phau ntawv teev npe.
- Nco ntsoov tias koj nyem rau ntawm Extract xav tau cov tsev qiv ntawv nkag rau hauv JAR xaiv. Tsis quav ntsej lwm cov ntawv qhia zaub mov hauv lub qhov rai, tom qab ntawd nyem qhov ua tiav.
Txoj Kev 2 ntawm 3: Tsim Icons
Kauj Ruam 1. Nrhiav lossis xaiv cov duab tsim nyog rau koj qhov program
Lub cim no yuav pom los ntawm cov neeg siv feem ntau vim tias tus neeg siv yuav nyem rau lub cim kom qhib koj lub program. Xaiv lub cim uas yooj yim kom nco lossis haum rau koj qhov program. Nco ntsoov tias cov duab loj yog 256x256 pixels.
Kauj Ruam 2. Mus ntsib
Lub vev xaib no tso cai rau koj hloov pauv cov duab ib txwm muaj -p.webp
Kauj Ruam 3. Nkag mus rau URL ntawm daim duab, lossis xaiv ib daim duab los ntawm koj lub khoos phis tawj kom tig cov duab ua lub cim
Tom qab ntawd, nyem lub pob Mus.
Txoj Kev 3 ntawm 3: Tsim Cov Ntaub Ntawv EXE
Kauj Ruam 1. Rub tawm Launch4J los ntawm
Qhov program no yog tsim los sau koj cov haujlwm Java rau hauv EXE cov ntaub ntawv.
Kauj Ruam 2. Hauv thawj lub npov ntawv, nkag mus rau qhov chaw khaws cov ntaub ntawv EXE, lossis xaiv qhov chaw nrog cov nyees khawm muab
Nco ntsoov tias koj tso cov.exe txuas ntxiv ntawm qhov kawg ntawm cov npe ntawv.
Kauj Ruam 3. Hauv kab ntawv thib ob, xaiv cov ntawv JAR xa los ntawm dab noj hnub
Kauj Ruam 4. Hauv kab ntawv plaub (Icon), nkag mus rau qhov chaw kom txuag lub cim, lossis xaiv lub cim ntawv nrog cov nyees khawm muaj
Cov kauj ruam no yog nyob ntawm yeem; yog tias koj tsis nkag mus rau lub cim, lub kaw lus ua haujlwm yuav tso tawm lub cim cim rau EXE cov ntaub ntawv.
Kauj Ruam 5. Ntawm JRE tab, xaiv Min JRE Version version, tom qab ntawd nyem "1.4.0" kom paub tseeb tias tus neeg siv tuaj yeem ua haujlwm nrog qhov tsim nyog Java version
Koj tuaj yeem xaiv lwm Java version, tab sis feem ntau, 1.4.0 yuav txaus.
Kauj Ruam 6. Nyem rau Gear-shaped Build wrapper khawm nyob rau sab saum toj ntawm lub vijtsam
Kauj Ruam 7. Npe XML cov ntaub ntawv raws li xav tau, tom qab ntawd nyem Txuag
Cov ntaub ntawv XML no yog cov ntaub ntawv XML txheem. Tom qab ntawv, koj cov ntaub ntawv EXE yuav pib tsim.
Lub tswv yim
- Nco ntsoov tias qhov loj me ntawm daim duab los siv ua lub cim tsis loj dua 256x256. Xaiv cov duab hauv Launch4J.
- Nco ntsoov tias txhua cov ntaub ntawv koj xaiv muaj qhov txuas ntxiv raug.