2008年10月3日 星期五

使用Eclipse開發ZK

使用Eclipse開發ZK的步驟,也是筆記一下,不過沒有圖就是了XD

1.
安裝Java SDK 1.6.7
http://java.sun.com

2.
安裝Tomcat 6.0.18
http://tomcat.apache.org/

3.
安裝Eclipse 3.4 IDE for Java EE Developers
http://www.eclipse.org/

4.
下載ZK 3.0.7
http://www.zkoss.org/download/zk.dsp
zk-bin-3.0.7.zip

5.
安裝ZK Studio到Eclipse
http://www.zkoss.org/download/zkstudio.dsp

6.
設定 ZK Settings Preference
Windows -> Preferences -> ZK Settings -> ZK Packages
Add File -> zk-bin-3.0.7.zip

7.
設定讀取zul檔
Windows -> Preferences -> General -> Content Types -> Text -> XML
Add -> *.zul

8.
設定server
Windows -> Preferences -> Server -> Runtime Environments
Add -> Apache Tomcat v6.0 -> Next -> set directory

9.
設定Server View
Windows -> Show View -> Other... -> Server -> Servers
Servers -> New -> Server -> Apache Tomcat v6.0

10.
建立Dynamic Web Proect
File -> New -> Other... -> Web -> Dynamic Web Proect
Configuration -> Modify... -> ZK Web Application -> ZK Updata Manager

11.
建立helloworld.zul
在剛建立好的Project下的目錄WebContent建立一個helloworld.zul檔案
內容如下

<window title="My First window" border="normal" width="200px">
Hello, World!XD
</window>

12.
啟動Tomcat
Run -> Run As -> Run on Server
Eclipse會開一個Browser顯示剛剛的結果

沒有留言: