ZK开发环境快速配置

以下内容全部来自ZKQuickStart 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里面查看)

 

你可能感兴趣的:(eclipse,tomcat,jsp,MyEclipse,zk)