Running the KitchenSink sample in Eclipse

33 views
Skip to first unread message

BTH

unread,
Aug 10, 2006, 5:14:23 PM8/10/06
to Google Web Toolkit
Hello,

Have already installed Eclipse and ran some programs like
Hello and Dynatable but want help with the KitchenSink sample.

Someone on this forum said simply creating a Hello and copying the
src directory from KitchenSink is enough to run it but that is too
sinple.

Can someone help me. Lets start with an explanation of the
applicationCreator command.

What does the string com.mycompany.client etc. means ?
How it can this be made matching with the structure of the KitchenSink
sample
and how can you check that before creating the app?

TheLobster at Gmail dot Com

unread,
Aug 11, 2006, 10:22:09 AM8/11/06
to Google Web Toolkit
Before we start... Read this link:
http://code.google.com/webtoolkit/gettingstarted.html
It will be invaluable for well.... getting started.

Look especally at "Creating an Application from Scratch (with Eclipse)"


> Hello,
>
> Have already installed Eclipse and ran some programs like
> Hello and Dynatable but want help with the KitchenSink sample.
>
> Someone on this forum said simply creating a Hello and copying the
> src directory from KitchenSink is enough to run it but that is too
> sinple.
>
> Can someone help me. Lets start with an explanation of the
> applicationCreator command.

applicationCreator -eclipse MyProject
com.mycompany.client.MyApplication

will create: the directories in the src directory for your application
(com\mycompany\client && com\mycompany\public), the launch
configuration for eclipse, the xml files and example project.

>
> What does the string com.mycompany.client etc. means ?

com.mycomapny.client is (as far as i know) the standard way of
orginizing packages. The idea is that com denotes that you are a
company who is creating the source, mycompany is the company's name and
client is the code that was developed. For GWT Widget Library you'll
notice that they use org instead of com, this is because they are an
orgizination. The packages eventually translate into directory
structure as well. So you'll see that the end result is
src/com/mycompany/client/foo.java .

> How it can this be made matching with the structure of the KitchenSink
> sample

After you've made your Hello project fully (project and application
creation) you can copy the example source from
src/com/google/gwt/sample/kitchensink/client to your Hello's client
folder (com/mycomany/hello/)

Then you must open KitchenSink.java and copy it all into your
Hello.java and change all instances of KitchenSink to Hello.

> and how can you check that before creating the app?

If you are running eclipse, there should be no errors.

BTH

unread,
Aug 11, 2006, 1:57:54 PM8/11/06
to Google Web Toolkit
What does client and public mean in com.mycompany.client and why is
a com.mycompany.public also created?

IamRobe...@gmail.com

unread,
Aug 11, 2006, 2:09:50 PM8/11/06
to Google Web Toolkit
The "client" package is used for Java code that is to be compiled to
JavaScript. This also includes any sub-packages. You can only use
Java classes in this package that are able to be compiled (i.e. no
server-side code).

com.mycompany.client
com.mycompany.client.ui
com.mycompany.client.util
...etc...

The "public" folder is used to store media items that are referenced in
your project. This includes the HTML file for the project, any pure
JavaScript files, images, videos, flash, etc. Bascially any file that
you plan on deploying to the web site.

Rob

Reply all
Reply to author
Forward
0 new messages