ZK Studio, An Eclipse Plug-in to Quick start Your ZK Project

Ian Tsai, Engineer, Potix Corporation
Feb. 05, 2008

Version & Requirement

Introduction

Every time we try to start a new Dynamic Web Project in Eclipse, we always need to do the following routines:

  1. Find all Jars from ZK_DOWNLOADED_PACKAGE/dist/lib
  2. Copy all these Jars from "dist/lib", "dist/lib" to "WEB-INF/lib/"
  3. If your application needs to use ZK in JSP, JSF, copy more Jars to "WEB-INF/lib/"
  4. Add ZK's settings in web.xml
  5. Add zk.xml for customized settings

Although these steps are easy to perform, a lazy person like me would ask: "why can't Eclipse handle these for me?". In this article I'll show you how ZK Studio can handle these for you.

Installation

The installation of ZK Studio is just like the installation of any other Eclipse plug-in. You put "org.zkoss.eclipse.setting_0.5.0.vxxx.jar" into your eclipse3.3.x like: "ECLIPSE_HOME/plugins" then restart your eclipse.

Live Demo

The demonstration video below shows you how to use this plug-in:

Video's Hyperlink.

ZK Package Managements in Eclipse Preferenece Dialog

  1. In your Eclipse IDE, click toolbar "Window" and select "Preferences...".
  2. at preference tree, select "ZK" category then chose "Installed ZKs".
  3. Currently there are no installed ZKs, so we need to prepare one. Preparing a ZK package is very simple:

    1. download ZK's binary distribution from SourceForge.net
    2. Unpack it as a folder, put it in a proper place like: "C:\ZK\"
    3. Thats all you need to do.
  4. Back to Eclipse IDE's preference dialog. In "Installed ZKs" click "Add..." button and chose the package you prepared.
  5. Press "apply", "ok" to quit preference dialog.

Now you can install a ZK package you just added into a 'Dynamic Web Project' after all these settings.

Add ZK while creating Dynamic Web Project

The way to create a new 'Dynamic Web Project' is still the same:

  1. In Eclipse IDE, click on 'File', select 'New'->'Project' and chose 'Web'->'Dynamic Web Project' in new project dialog.
  2. Then, Eclipse will open a new project wizard, type the project name and press next.
  3. In "Project Facets" page, check "ZK WebApp" facet.
  4. In "Web Module" page, do your configuration and press "next" button.
  5. In "Select Project's ZK Version" page, select the ZK version you want to use in this project.
  6. Click on "finish", and Eclipse will generate a new project with ZK inside.

Eclipse Plug-in Require-Bundle:

If your environment can't run zk-studio, please make sure these required Bundles are in your eclipse's plugin folder. Actually, if you already installed WTP platform in you eclipse, then zk-studio should operate very well.

Eclipse 3.3.X

  • org.eclipse.ui
  • org.eclipse.core.runtime
  • org.eclipse.core.resources
  • org.eclipse.ui.forms
  • org.eclipse.jdt.ui
  • org.eclipse.jdt.core
  • org.eclipse.ui.ide

Eclipse Web Standard Tools

  • org.eclipse.wst.common.project.facet.core
  • org.eclipse.wst.common.project.facet.ui
  • org.eclipse.wst.common.modulecore
  • org.eclipse.jst.j2ee.web
  • org.eclipse.jst.j2ee
  • org.eclipse.jst.j2ee.core

Eclipse EMF

  • org.eclipse.emf.common
  • org.eclipse.emf.ecore
  • org.eclipse.jem

Download

  1. zk-studio-0.5.1.zip

 

Comments
 
Marcos de Sousa
2008-02-06

Good Work.

ZK Studio real rock.

If version 0.5.0 is good, I think the next version will be better. I hope to have WYSIWYG.

Thanks

Richard
2008-02-06

Ok, but unfortunately I get a "Class file has invalid version" error here when selecting the facet and when accessing the zk studio preferences pane. (Eclipse 3.3.1.1 - OS X 10.4 - Java 1.5)

Might the distributed file be broken?

Dulds
2008-02-07

I tried to use Eclipse 3.3.0 - Java 1.5 on Win32 and had the same error as Richard (see above), I figured the release was compiled using Java 6 so I had to install Java 6 and now the error is gone. Guess there should be a "Use Java 6" reminder.

Richard
2008-02-07

Please provide the plugin in a Java 1.4 or 1.5 version. Java 6 still has to arrive properly on OS X and people will probably not want to risk their development environment by installing the Java 6 beta.

Ian Tsai
2008-02-08

I'll release a new version very soon.

Bo
2008-02-09

Installed eclipse per the link and installed the zk plugin as instructed.
ZK does not appear n the Windows->Preferences as portrayed in the instructional video. Switch from JRE 1.6 to 1.5 to see if that was the issue. ZK still not appearing. Are there other items that need to be installed?

fajar
2008-02-12

help me please
when i choosed instaled Zk there was error message
"Plug-in org.zkoss.eclipse.setting was unable to load class org.zkoss.eclipse.setting.zklib.MasterPreferencePage"

i'm using eclipse 3.2.1

thanks before

Ian Tsai
2008-02-12

You should use eclipse 3.3.X

Ian Tsai
2008-02-12

I have already rebuild the plug-in project in jdk1.5.
please try it again.
zk-studi0-0.5.1.zip

Ian Tsai
2008-02-13

Hi guys, are your problem been solved?

jony
2008-02-13

zk-studi0-0.5.1.zip on JDK1.5 works well,thanks,Ian Tsai

andy susanto
2008-02-13

download zkstudio-0.5.1.zip

if u use eclipse 3.3.1 with jdk 1.5

and the error of classes does not exist

Ian Tsai
2008-02-14

Thanks for you all guys.

If there's any other problems, please help me to post it to SourceForge.
I'll shoot it out there.

(^_^)

Andres B
2008-02-14

I download eclipse 3.2,3.3.1,europa and I have jdk 1.6 and it never works, I dont know how to fix it, if somebody can help me I appreciated.

Andres B

sani
2008-02-18

it is vers good thanks

6149sgd
2008-02-20

I am using MyEclipse 6.0.1 GA. After installing this plug-in, I can't add this capability into my Web Project.

comer
2008-02-21

Bo
2008-02-09
Installed eclipse per the link and installed the zk plugin as instructed.
ZK does not appear n the Windows->Preferences as portrayed in the instructional video. Switch from JRE 1.6 to 1.5 to see if that was the issue. ZK still not appearing. Are there other items that need to be installed?
----------------------------------------
I hava the same problem, anybody can help? thx.

eldiegos
2008-02-26

A great step for developers i hope the next will be a WYSIWYG editor.

kgingeri
2008-03-02

Ian, would it be possible to put ZK into an EasyEclipse install?

vernkin
2008-03-03

zk-studi0-0.5.1.zip on JDK1.5 works well
why not change the link at the beginning of this article
-----------------------------------------------
Version & Requirement
ZK Studio 0.5.0 (Eclipse Plug-in)
Eclipse 3.3.X with WTP platform
Any ZK you like after Version 2.4

Ian Tsai
2008-03-03

to vernkin:
It's a good advise, I'll do it right now.

to guys who can't install zk plug-in:
This must be some part of required plug-ins are not installed.
I'll post a required plug-in list to let you check your environment, if there's still any trouble, please help me post it to SourceForge.net's forum, your request will
get answer more quickly out there.

Ian Tsai
2008-03-03

to kgingeri

I think there's no conflict because EasyEclipse is just another plug-in, it should work fine.

matthew
2008-03-15

A great step for developers i hope the next will be a WYSIWYG editor.

Robby
2008-03-16

How can I add ZK after creating a project?

frank
2008-03-26

where I can get the code of zk studio ?

henrichen
2008-04-06

http://sourceforge.net/project/downloading.php?groupname=zk1&filename=zk-studio-0.5.2.zip

frank
2008-04-09

I mean Where I can download the source of zk studio ,not bin files.

simon
2008-05-05

This link zk+maven+eclipse
shows how to setup eclipse to lauch maven to build and debug a zk app. That is a lot easier than messing around with j2ee plug-ins for eclipse so long as you know how to setup maven for a project. This link maven webapp shows how to get maven to create your project space. Then copy over some of the pom.xml settings in zkfoodtogo to get yourself going.

Amrapali
2008-07-18

Provide a source code of application built using struts+spring+zk

Vinay
2008-08-27

I downloaded eclipse 3.4 which is the latest version as of now and now I can see the zk section at the bottom of my preferences...Thanks!

Elissandro Mendes
2008-09-04

How to make Zk Studio works with Grails ?

thanks.

 
 
Leave a Reply
 
Name (required)
Mail (will not be published) (required)
Website
(Case Insensitive)
Bold textItalic textUnderLine textSource CodeHorizontal rulerExternal Link
Post
Preview