๋ฉํํ์ผ
Getdown์
getdown.txt ๋ฐ
Digest.txt ๋ผ๋ ๋ ๊ฐ์ง ๋ฉํํ์ผ์ ์ฌ์ฉํฉ๋๋ค .
getdown.txt ํ์ผ์ ์ง์ ์์ฑํ๋ฉด(์๋์ ์ค๋ช
์ด ์์) ํ๋ก๊ทธ๋จ์ด ํ๋ก์ ํธ์ ํ์ผ์ ๊ธฐ๋ฐ์ผ๋ก
Digest.txt ํ์ผ์ ์์ฑํฉ๋๋ค .
getdown.txt
getdown.txt ํ์ผ์๋ Getdown์ด ์ ํ๋ฆฌ์ผ์ด์
์ ์คํํ๊ณ ์
๋ฐ์ดํธํ๋ ๋ฐ ํ์ํ ๋ชจ๋ ๊ฒ์ด ์ ์ฅ๋์ด ์์ต๋๋ค.
์ด์ ํ์ค getdown.txt ๊ตฌ์กฐ๋ฅผ ์ค๋ช
ํ๊ณ ๋ชจ๋ ๊ฐ๋ฅ์ฑ์ ๋ํ
์ ์ฒด ์ค๋ช
์ ์ฝ์ ์ ์์ต๋๋ค . ํ์ค
getdown.txt ๋ ๋ค์๊ณผ ๊ฐ์ต๋๋ค .
# ํด๋ผ์ด์ธํธ ํ๋ก๊ทธ๋จ์ด ์
๋ฐ์ดํธ๋ฅผ ๋ค์ด๋ก๋ํ ํด๋์ URL ์ฃผ์ appbase = http://myapplication.com/myapp/ # ์ฌ์ฉ์ ์ธํฐํ์ด์ค ๊ตฌ์ฑ ํ์ผ ui.name = My Application # ์ ํ๋ฆฌ์ผ์ด์
์ฝ๋์ ๋ชจ๋ jar ํ์ผ = application.jar # ๋ฉ์๋๊ฐ ์๋ ํด๋์ค main(String[] args) class = myapplication.MyApplication
appbase์๋ ์ ํ๋ฆฌ์ผ์ด์
์ ๋ค์ด๋ก๋ํ URL๊ณผ ๋ ๊ฐ์ ๋ฉํํ์ผ์ด ํฌํจ๋์ด ์์ต๋๋ค. ์ฐ๋ฆฌ์ ๊ฒฝ์ฐ ์ ํ๋ฆฌ์ผ์ด์
๊ณผ ๋ฉํํ์ผ์ ์ ์ฒด ๊ฒฝ๋ก๋ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
- http://myapplication.com/myapp/getdown.txt
- http://myapplication.com/myapp/digest.txt
- http://myapplication.com/myapp/application.jar
๋ค์ด์ ์คํธ.txt
Digest.txt๋ com.Threerings.getdown.tools.Digester ์ ํธ๋ฆฌํฐ ์ ์ํด ์์ฑ๋ฉ๋๋ค . ์ด๋ ๊ฒ ํ๋ ค๋ฉด
getdown-XYjar ์ ๋ค์ด๋ก๋ํ์ธ์ . ์ด์ ํด๋์ ์ ํ๋ฆฌ์ผ์ด์
๊ณผ ํ๋์ ๋ฉํํ์ผ์ด ์์ต๋๋ค.
myapp/getdown.txt myapp/application.jar
์ด์ Digest.txt ๋ฅผ ์์ฑํ ์ฐจ๋ก์
๋๋ค . ์ด๋ฅผ ์ํํ๋ ค๋ฉด ๋ช
๋ น์ค์ ๋ค์์ ์
๋ ฅํ์ธ์.
% java -classpath getdown-XYjar com.Threerings.getdown.tools.Digester myapp
์ฌ๊ธฐ์
myapp์ ํ์ฌ ์ ํ๋ฆฌ์ผ์ด์
๊ณผ ํ๋์ ๋ฉํํ์ผ์ด ์๋
myapp ํด๋ ์ ๊ฒฝ๋ก์
๋๋ค . ๋ชจ๋ ์์
์ ์ฌ๋ฐ๋ฅด๊ฒ ์ํํ๋ค๋ฉด ๋ช
๋ น์ค์ ๋ค์ ๋ฉ์์ง๊ฐ ๋ํ๋ฉ๋๋ค.
๋ค์ด์ ์คํธ ํ์ผ 'myapp/digest.txt' ์์ฑ ์ค...
๋ํ ์ค๋ซ๋์ ๊ธฐ๋ค๋ ค์จ ๋ ๋ฒ์งธ ๋ฉํํ์ผ์ธ
gest.txt๊ฐ ์ ํ๋ฆฌ์ผ์ด์
ํด๋์ ์ถ๊ฐ๋ฉ๋๋ค .
Digest.txt ์์ฑ์ ๋ํ ์์ธํ ์ง์นจ์
์ฌ๊ธฐ์์ ํ์ธํ ์ ์์ต๋๋ค.
์ฌ๊ธฐ๋ ์ฌ๋
์ด์ ํด๋์๋ ์ ํ๋ฆฌ์ผ์ด์
๊ณผ ๋ ๊ฐ์ ๋ฉํํ์ผ ๋ฑ ํ์ํ ๋ชจ๋ ๊ฒ์ด ํฌํจ๋์ด ์์ต๋๋ค. ์๋ฒ์ ์
๋ก๋ํ ์ ์์ต๋๋ค. ํด๋ ์ฃผ์๋
appbase ํ๋ ์
getdown.txt ์ ์ง์ ๋ ์ฃผ์์ฌ์ผ ํ๋ค๋ ์ ์ ์์ง ๋ง์ธ์ . ๊ทธ๋ฆฌ๊ณ ๋ด๋ถ ํ์ผ์
ํด๋ ์ฃผ์ + ํ์ผ ์ด๋ฆ ์ผ๋ก ์ก์ธ์คํ ์ ์์ด์ผ ํฉ๋๋ค . ์ด์ ๊ฐ์ด:
- http://myapplication.com/myapp/getdown.txt
- http://myapplication.com/myapp/digest.txt
- http://myapplication.com/myapp/application.jar
์์
ํ์ธ ์ค
์ด์ ๊ทํ์ ์ ํ๋ฆฌ์ผ์ด์
์ ์ฌ์ฉํ ํด๋ผ์ด์ธํธ๋ฅผ ๋์ ํด ๋ณด๊ฒ ์ต๋๋ค. ๋จผ์ ํด๋๋ฅผ ๋ง๋ค๊ณ ๊ทธ ์์
getdown-XYjar์ ๋์ต๋๋ค . ์ด์ ํ ์ค๋ง ํฌํจํ๋
getdown.txt๋ฅผ ๋ง๋ค์ด ๋ณด๊ฒ ์ต๋๋ค .
์ฑ๋ฒ ์ด์ค = http://myapplication.com/myapp/
์ด์ ๋ช
๋ น์ค์ ๋ค์ ๋ช
๋ น์ ์์ฑํฉ๋๋ค.
% java -jar myapp/getdown-XYjar myapp
์ ํ๋ฆฌ์ผ์ด์
์ ์
๋ฐ์ดํธํ๊ณ ์คํํด์ผ ํ๋ ๊ฒฝ์ฐ ํ์ผ์ ์๋ฒ์ ์๋ ํ์ผ๊ณผ ๋น๊ตํด์ผ ํฉ๋๋ค. ๊ทธ๊ฒ ๋ค์ผ! __________________________________________________________________________________________________________ PS ๋ช
๋ น์ค๋ก ์์
ํ๋ ค๋ฉด ๋ฐฐ์น ํ์ผ์ ์ฌ์ฉํ ์ ์์ต๋๋ค.
create Digest.bat ๋ ๋ค์๊ณผ ๊ฐ์ต๋๋ค .
java -classpath getdown-1.3.1.jar com. threerings.getdown.tools.Digester %CD%
๊ทธ๋ฆฌ๊ณ ์ฌ๊ธฐ
update.bat ๊ฐ ์์ต๋๋ค :
java -jar getdown-1.3.1.jar %CD%
GO TO FULL VERSION