This section gives a step-by-step guide for setting up a development environment. IT Mill Toolkit supports a wide variety of tools, so you can use any IDE for writing the code, most web browsers for viewing the results, any operating system or processor supported by the Java 1.5 platform, and almost any Java server for deploying the results.
In this example, we use the following toolchain:
Figure 1.3, “Development Toolchain and Process” above illustrates the development environment and process. You develop your application as an Eclipse project. The project must include, in addition to your source code, the IT Mill Toolkit Library package, and the theme package. It can, optionally, include your project-specific themes. When the project is compiled and packaged as a web application (WAR), the IT Mill components are copied to the package. Web Tools Platform for Eclipse allows easy deployment of web applications and debugging them under Tomcat.
Java SDK is required by the Eclipse IDE during development. You may also need it for some other tasks. IT Mill Toolkit is compatible with Java 1.5 and later editions. (Java 1.4 is no longer supported since version 5.3.0 because of the requirements of GWT 1.5.)
Setting up the Java in Windows XP is really straightforward.
Download the installation packages from:
Install the Java SDK by running the installer. The default options are fine.
Download the following package:
/opt
. For example, for Java SDK, enter (either as
root or with sudo in Linux):
and follow the instructions in the installer.#
cd/opt
#
sh(path-to-installation-package)/jdk-6u1-linux-i586.bin
Setting up the Eclipse IDE in Windows XP is really straightforward.
Download the installation package from:
Decompress the Eclipse IDE package to a suitable
directory. You are free to select any directory and to use any
ZIP decompressor, but in this example we decompress the ZIP
file by just double-clicking it and selecting "Extract all
files" task from Windows compressed folder task. In our
installation example, we use C:\dev
as
the target directory.
Eclipse is now installed in
C:\dev\eclipse
and can be started from
there (by clicking eclipse.exe).
You have two basic options for installing Eclipse in Linux and UNIX: you can either install it using the package manager of your operating system or by downloading and installing the packages manually. The manual installation method is recommended, because the latest versions of the packages available in a Linux package repository may be incompatible with Eclipse plugins that are not installed using the package management. The versions mentioned above have been tested to work.
Download the following package:
Eclipse should normally be installed as a regular user, as this makes installation of plugins easier. Eclipse also stores some user settings in the installation directory. To install the package, enter:
This will extract the package to a subdirectory with the name$
tar zxf(path-to-installation-package)/eclipse-jee-europa-fall-linux-gtk.tar.gz
eclipse
.
You may wish to add the Eclipse installation directory and the
bin
subdirectory in the installation directory of
Java SDK to your system or user PATH.
Alternatively, the package management system of your operating system may provide the packages. For example, in Ubuntu Linux, which includes Sun Java SDK and Eclipse in its APT repository, you can install the programs from a package manager GUI or from command-line with a command such as:
$
sudo apt-get install sun-java6-jdk eclipse
This is not, however, recommended, because the Eclipse package may not include all the necessary Java EE tools, most importantly the Web Standard Tools, and it may cause incompatibilities with some components that are not installed with the package management system of your operating system.
Apache Tomcat is a lightweight Java web server suitable for both development and production. There are many ways to install it, but here we simply decompress the installation package.
Apache Tomcat should be installed with user permissions. During development, you will be running the Eclipse or some other IDE with user permissions, but Eclipse can not deploy web applications to Tomcat that is installed system-wide with administrator or root permissions.
Download the installation package:
Apache Tomcat 6.0 (Core Binary Distribution) from
http://tomcat.apache.org/
Decompress Apache Tomcat package to a suitable target directory,
such as C:\dev
in Windows or
/opt
in Linux or Mac OS X. The Apache Tomcat
home directory will be
C:\dev\apache-tomcat-6.0.x
or
/opt/apache-tomcat-6.0.x
,
respectively.
We are now ready to start and configure Eclipse. Start it by
running C:\dev\eclipse\eclipse.exe
(Windows)
or /opt/eclipse/eclipse
(Linux or OS X).
When starting Eclipse for the first time, it asks where to save
the workspace. You can select any directory, but here we select
C:\dev\workspace
(Windows) or
/home/<user>/workspace
(Linux or OS
X). We suggest that you also set this as the default.
You can see some Eclipse tutorials on the "Welcome" -screen or go to workbench to continue.
Configure the Tomcat Server by selecting
→ . Select → from the tree on the left. Set Tomcat version to 6.x. Other defaults are fine.Because IT Mill Toolkit supports many web browsers, you can use any of them for development. If you also plan to build any theme parts, like CSS files, customized layouts, or even completely new user interface components, we recommend that you use Firefox for debugging. The toolkit specially supports Firebug debugger and shows special support information there.
To install Firefox, just go to www.mozilla.com and download and run the installer.
After installing Firefox, use it to open http://www.getfirebug.com/ to install latest stable version of Firebug available for the browser. If clicking the -button does not open the install window, allow installs from the domain by clicking the yellow warning bar at the top of the browser-window.
When Firebug is installed, it can be enabled at any time from the bottom right corner of the Firefox window. See the example on debugging in Figure 1.4, “Firebug Debugger for Firefox” below.
Now that you have installed the development environment, you can proceed to making your first application.