Friday, 20 March 2015

How to create ZK Maven Project–Create “Hello World” Application in ZK

        

In Eclipse, Select File -> New -> Other -> Maven Project

clip_image002

Leave everything as default and click next as shown here.

clip_image004

From the Select an Archetype screen, select ZK Maven Archetype from the catalog dropdown list.

And Select zk-archetype-webapp from the list. (At the time of writing this is at version 7.0.3.1).

clip_image006

Next, fill in details for group id, artifact id, version number and package name.

clip_image008

Click Finish and the Eclipse status bar should say ' Creating zk-archetype-webapp ' and ' Updating Maven Dependencies '. If this is the user's first time dealing with ZK libraries, Maven will download the necessary dependencies to compile and run this example, and would be stored in .m2/repository in the user's home directory.

Now goto Windows -> Show View and Select Navigator. You can see the folder structure of our HelloZK Project as follows

clip_image002[4]

Follow the steps to run the application
1. Select the "HelloZK" project in the Navigator
2. Right Click and Select "Run as " and Select the first option "Run On Server"

clip_image004[4]

Click Finish button
The output of the HelloZK Application will be shown in the internal Browser of the Eclipse as shown here

clip_image006[4]



        

1 comment: