1.下載地址:http://www.igniterealtime.org/downloads/source.jsp
2.編譯工具eclipse,選用ee版本的,下載地址:http://www.eclipse.org/downloads/
3.例如:eclipse-jee-kepler-SR1-win32.zip和openfire_src_3_9_1.zip
4.apache-ant 和 myeclipse都可以編譯通過,略去,,,
5.解壓openfire_src_3_9_1.zip得到openfire_src
6.開啟eclipse
7.開啟:File->New->Java Project
8.在快顯視窗中,鉤掉“Use default location”,用location右側的Browse,瀏覽到解壓的openfire_src,選中,自動填滿Project name為openfire_src
9.工程會報錯,幹掉那些出錯的包。用New->Source Folder增加src/i18n和src/resources/jar,如圖:
10.點擊build檔案夾,看到build.xml。在其上右鍵,Debug As->Ant Build開始編譯,console中會提示編譯正確,在工程上按F5,產生了target和work檔案夾
11.點擊Run->Debug Configurations。彈出的視窗,main屬性頁面中,Java Applications項,在Main class中,選中org.jivesoftware.openfire.starter.ServerStarter
12.Arguments屬性頁面,VM arguments編輯框,配置openfireHome路徑,增加-DopenfireHome="d:/test/openfire_src/target/openfire"
13.正確運行。進入http://127.0.0.1:9090/配置