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.

paul
2008-12-23

Hi,

We are very interested in zk, but the biggest problem for us is lacking of working DB example. Every time we install a new version of eclipse and zk,
there are always some error messages for the DB related example provided by zk.

So could you please kindly provide a source code & a video of application built using struts+spring+hibernate+zk by eclipse IDE

Or, just tell us the price for this. We are tired of trying these.

Paul,

jean
2008-12-25

Hi Paul,

Thanks for your suggestion. We will think about how we can provide more DB related examples or tutorials.

Also we'd like to know more about your project.
Would you drop me a mail at [jeanyen at zkoss dot org]?

Jean

Andraw
2009-03-24

Hi, Dear all,

I don't know if it's right place for me to post this question here.
I am new to ZK, but I will create a new project using ZK, so today I install Eclips3.4.1, ZK studio and ZK library, Java 1.5 and Tomcat 5.5 (at port 8080). I follow the instruction to download all the file, change the settings.
My problem is that I create a server (Tomcat 5.5) from Eclipse. after I start it, I can see the status is change to "Started", but when I run http://localhost:8080/, I got error "HTTP Status 404 - / "
"The requested resource (/) is not available",
I check the server setting several times but cannot find any problem. can any body tell me what's wrong?
Thanks!

2009-03-25

ZK is base on J2EE,I think you problem is base J2EE environment problem (the url of zk should like : 'http://host:port/app/xyz.zul' not only 'http://host:port/').
the ZK documents here : http://docs.zkoss.org/wiki/Main_Page
and please ask this kind of question here : http://www.zkoss.org/forum/index.zul#path%3Dindex%3B

Andraw
2009-03-25

I didn't begin to touch Java codes yet. after I start Tomcat, and browse to http://localhost:8080/, the tomcat home page will be run, right? before I run ZK program, we need Tomcat server to be run first.

2009-03-31

If your eclipse doesn't assign any projects to a tomcat server, the server will surely have nothing in http://localhost:8080/
you have to create some web projects and assign it to the server, start that server, then browse the http://localhost:8080/[web project name]/ to see it.

Mario
2009-05-01

Hello
Could anyone explain to me why do i get the message "Not Available, a Visual Editor only works with ZK supported Editor" since i'm using
Eclipse SDK
Version: 3.4.2
Build id: M20090211-1700

and ZK Package 3.6.1 with ZK Studio Eclipse Plugin
Version 0.9.3.v2009032221453

Thanks

2009-05-04

Visual Editor is a eclipse View, it needs correct editor (such as, Zul Editor, Style Designer) to show the preview. If you are editing a document with other editor(e.g. editing with XML Editor), then it will show this message.

and notice again, please ask this kind of question at studio forum.

winwe
2009-06-02

hello
Like 6149sgd ,I am using myeclipse 6.0 install zk is ok, but can't use it in my web progect! can you help me?

Mark Ricard
2009-07-27

"You put 'org.zkoss.eclipse.setting_0.5.0.vxxx.jar' into your eclipse3.3.x like: 'ECLIPSE_HOME/plugins' then restart your eclipse."

I clicked on the link at the top of the posting called "ZK Studio 0.5.1 (Eclipse Plug-in)" and it brought me to the download page. I then clicked on the 'zk-bin-5.0.0-FL-2009-07-21.zip' and opened it up... I see no org.zkoss.eclipse.setting_0.5.0.vxxx.jar in there. Where is this jar?

nasir
2009-08-04

hi i am new in java. i want to configure the ZK framwork configration using eclips. any one help me how can i do it ?

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