ZK开发环境快速配置

系统 1690 0

以下内容全部来自 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 )

1. Right click on the MyApps project in explorer and in the Menu dialog select Run As > Run on Server (右键项目,选择Run AS -> Run on Server)
2. Select Apache > Tomcat v6.0 Server in server type dialog and then click Finish (选好服务器,点Finish就行了)
3. See the result in your browser. (在你的Browser里面查看)

 

ZK开发环境快速配置


更多文章、技术交流、商务合作、联系博主

微信扫码或搜索:z360901061

微信扫一扫加我为好友

QQ号联系: 360901061

您的支持是博主写作最大的动力,如果您喜欢我的文章,感觉我的文章对您有帮助,请用微信扫描下面二维码支持博主2元、5元、10元、20元等您想捐的金额吧,狠狠点击下面给点支持吧,站长非常感激您!手机微信长按不能支付解决办法:请将微信支付二维码保存到相册,切换到微信,然后点击微信右上角扫一扫功能,选择支付二维码完成支付。

【本文对您有帮助就好】

您的支持是博主写作最大的动力,如果您喜欢我的文章,感觉我的文章对您有帮助,请用微信扫描上面二维码支持博主2元、5元、10元、自定义金额等您想捐的金额吧,站长会非常 感谢您的哦!!!

发表我的评论
最新评论 总共0条评论