以下內容全部來自
ZK
的
QuickStart Guide(寫的不好,大家就當學習英文吧。)
如果不清楚的可以直接看
ZK
官方的
QuickStart Guide
http://docs.zkoss.org/wiki/QuickStart_Guide
第一步:準備環境運行
ZK(
Preparing an environment to run ZK
)
??? 先決條件( Prerequisites )
??????? 如果你沒有安裝以下軟件,請先下載了再說吧(If you haven't installed the following applications on your computer, please download and install them first. ) ??
??????? Java SE Development Kit (JDK)
??????? Application Server
??????? ZK Library ???
????????ZK?Studio
??????? Eclipse
??????????? JDK,Eclipse和服務器就不說了啥,服務器就用Tomcat吧
?
??????????? ZK Library可以在 http://www.zkoss.org/download/zk.dsp 這里下載
??????????? ZK Studio插件可以在 http://www.zkoss.org/product/zkstudio.dsp 這里下載,并安裝到Eclipse上
?
第二步,配置ZK庫(Configuring the ZK Library )
??????? 1.打開Eclipse(前提條件是已經安裝好了ZK studio插件)Start an Eclipse installation which already contains ZK Studio.
??????? 2.點擊菜單Window->Preferences(From menu goto Windows > Preferences )
??????? 3.在打開的這個窗口上選擇ZK->ZK Packages(On the Preferences Window, select ZK > ZK Packages )
??????? 4.點擊Add Diretory 選擇到你下載的ZK Library包,不用解壓,直接是ZIP文件(If you have extracted the ZK library please click Add Directory and select the location where you extracted file, then click OK; Otherwise click Add File and select the ZK Package zip file. )如下圖
???????
?
?
5.會跳出一個窗口來,點擊OK
?6.讓你給這個包命個名,就用默認的吧,點擊OK(Name the imported package and then click OK)
?
7.再選擇上那個ZK Library就行了,如果你不選擇,會自動選擇最后你引入的版本的(ZK Studio will now import the selected ZK Library,If you don't select a default ZK library, ZK Studio will automatically choose the latest version of your imported ZK Packages. )
好了,就這樣,ZK的環境就配置完了
?
官方還提供了豐富的例子程序,在線看: http://www.zkoss.org/zkdemo/userguide
下載運行: http://prdownloads.sourceforge.net/zk1/zk-demo-3.6.0.zip?download
?
第三步:用Eclipse創建ZK項目( Creating a "hello world" application from scratch (with an IDE) )
1.創建Dynamic web Project( Creating a new "Dynamic Web Project")
1.選擇File->New->Dynamic Web Project,如果沒有就選Others,再勾上Show All Wizards(Click
File > New > Dynamic Web Project
in Eclipse main menu)
?2.我這里和官方的不一樣,再點Next,加入ZK Supports,再點Finish就完成了一個項目的創建
第四步:創建一個新的ZUL文件( Creating a new ZUL file )
這個就像建立JSP文件一樣的
第五步:流行ZUL文件( Running the ZUL file )
?
更多文章、技術交流、商務合作、聯系博主
微信掃碼或搜索:z360901061

微信掃一掃加我為好友
QQ號聯系: 360901061
您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。
【本文對您有幫助就好】元
