This is a walkthrough, getting started, tutorial or just something I wrote down mostly for myself. Someone else might find it useful too so I decided to post it on my blog more or less as it is. Most of the information is gathered from other sources on the Internet, and I've tried to list the resources. If you find a missing resource or error in the text, please send me a note.
Much of the information in this "article" is gathered from the ObjectLearn website, which has a number of great walkthroughs for Lomboz.
Note! Please read the changes section below, it may contain important information.
2005-10-31 Important note! I got a message that the ObjectWeb people now have repackaged Lomboz into something a little easier to install and get started. Have a look at their website before you dig into this (perhaps now obsolete) article -> http://lomboz.objectweb.org/downloads/drops/S-3.1RC2-200508311616/
2004-07-07 (a little bit later) Ok, article is now updated. I use Eclipse 3.0 and Lomboz 3rc2, and I've also added a short "getting started" section at the end.
2004-07-07 I just realized that both Eclipse and Lomboz had been updated with newer versions (version 3.0 of Eclipse for example) and I have to update this article again! :)
2004-07-06 Updated the Lomboz installation steps. A few things were very wrong. Also updated a few typos in the text. Thanks for the feedback.
This document is intended to explain how to install the Java IDE Eclipse and the Lomboz plug-in. Some of the information in this article is taken from the Eclipse and Lomboz (ObjectLearn) websites.
Eclipse is a kind of universal tool platform - an open extensible IDE for anything and nothing in particular. Eclipse is an open platform for tool integration built by an open community of tool providers. Operating under an open source paradigm, with a common public license that provides royalty free source code and worldwide redistribution rights, the eclipse platform provides tool developers with high flexibility and control over their software technology.
Lomboz is a free eclipse plug-in for the J2EE developers, developed by Objectlearn. It is a tool with a simple philosphy: "No magic tricks". Lomboz is integrated with many popular open source J2EE tools such as: Jasper, XDoclet, Axis and Ant. Lomboz is available as open source under LGPL license from at the ObjectWeb Forge.
Lomboz v3.0 uses models based on eclipse EMF project. If you do not have it installed already, You will need to download and install EMF runtime builds release 2.0.0 or later. EMF MUST BE INSTALLED PRIOR TO USING LOMBOZ.
Installation of Eclipse
How to install and configure Eclipse.
1) First of all, download and install a Java 2 SDK, Eclipse needs version 1.3 or higher, but Lomboz needs 1.4, so use J2SDK 1.4.2 from Sun http://java.sun.com/j2se/1.4.2/download.html.
2) Download Eclipse from http://www.eclipse.org/, preferably the latest 3.0 version.
3) Unzip the file to the root of the drive, for example C:\, this will give you a C:\eclipse\ directory where you’ll find the eclipse.exe binary.
4) Start eclipse by executing the eclipse.exe file.
5) Go to Window->Preferences then look at the settings for Java->Installed JREs and make sure that your JSDK is used. If it is not, add it to the list of installed JREs and check it. When I change JRE, I usually exit Eclipse and restart it... just to be sure.
Installation of EMF
How to install and configure EMF, a required J2EE plug-in for Eclipse if you want to use Lomboz.
1) Download EMF (in my case, version 2.0.0) from the EMF site.
2) Unzip it so it fits nicely into the existing Eclipse directory, in my case I unzip it to the C:\ because that's where I unzipped Eclipse (default).
Installation of Lomboz
How to install and configure Lomboz, a J2EE plug-in for Eclipse.
PRE-REQ: Lomboz v3.0 uses models based on eclipse EMF project. If you do not have it installed already, You will need to download and install EMF runtime builds release 2.0.0 or later. Download the "ALL" package.
1) First, download a version of Lomboz that runs well with the version of Eclipse that you use. In my case I use Lomboz version 3 RC 2 available from http://forge.objectweb.org/project/showfiles.php?group_id=97
2) Exit Eclipse if it is running.
3) The plug-in is distributed in ZIP format, therefore, using your ZIP file utility, unzip lomboz.zip file into the <Eclipse_Home> directory. This will create a couple new plug-in directories named com.objectlearn.jdt.j2ee and com.objectlearn.jdt.j2ee.editors. Make sure that Lomboz is extracted properly into the C:\eclipse\plugins directory.
4) Start Eclipse.
5) Select menu "Window>Customize Perspective...", in the "Shortcuts" tab choose the "New" submenu and check "Java->Lomboz J2EE Wizards".
6) Select menu "Window>Customize Perspective...", in the "Shortcuts" tab choose the "Show View" submenu and check "Lomboz J2EE".
7) Select menu "Window>Customize Perspective...", in the "Command"s tab in the available commands tab, check Lomboz Actions.
8) Close the "Customize Perspective" dialog by presseing the OK button.
9) Select menu "Window>Preferences", in the "Workbench->Label Decorations", check "Lomboz J2EE Decorators".
10) Once you confirmed your selections, you will see the newly added toolbar button in the Eclipse toolbar and the different Lomboz wizards will be available to you from the “File->New ” menu.
Configure LombozSome settings really MUST be properly configured for Lomboz to work. Follow these instructions to the point.
Java SettingsYou must make sure that Java projects have separate source and binary folders. Open the preferences dialog from "Window->Preferences" menu and expand the "Java->Build Path->New Project" settings. Make sure you set it up with this values:
- Check the "folders" radio button.
- Source folder name should be "src".
- Output folder name should be "bin".
- Select "JRE_LIB variable" in the drop-down list for JRE libraries.
Lomboz SettingsMost application servers use the standard Java compiler (javac) to compile JSP files. Javac is found in the tools.jar distributed with standard Java JSDKs (NOT JREs), that is why a proper JSDK must be installed for Lomboz (see above). You must select the tools.jar that will be used by the application servers here. It is normally found inside the “lib” folder under the JSDK installation.
Open the preferences dialog from "Window->Preferences" menu and expand the Lomboz settings. Then enter the path to the tools.jar file, something like: C:\j2sdk1.4.2_03\lib\tools.jar (depending on where you installed your JSDK). Leave the default values, but if Tomcat is used, you might want to check the setting for restarting server after deploy.
Open the preferences dialog from "Window->Preferences" menu and expand the "Lomboz->Server Definitions" settings. This is where you enter the correct settings for your selected application server. If you for example are using Tomcat 5.0.x, it might look like this:
- Application Server directory: C:\jakarta-tomcat-5.0.19
- Address: localhost
- Port: 8080
- Classpath variable name: TOMCAT_HOME
- Classpath variable: C:\jakarta-tomcat-5.0.19
NOTE: It is VERY important that you click Apply after you have changed the server settings. Step through the other tabs to make sure that the different CLASSPATH settings are correct.
Files with server definitions are stored in a folder named "servers" below the Lomboz plug-in directory. Lomboz scans the folder every time it needs a definition. To add a new server type, just add anotherone of these files into this folder.
In order to use (activate) any of these definitions you must ALWAYS visit the Lomboz preferences.
Creating and Testing a J2EE Application
Now Eclipse and Lomboz is ready for testing. Just to get you started:
1) Select "File->New->Project..."
2) Expand "Java" and select "Lomboz J2EE Wizards->Lomboz J2EE Project". (There are many ways to get here, just make sure you end up selecting "Lomboz J2EE Project" in the end :)
3) Continue the wizard by clicking "Next" to the "Project Settings" dialog.
4) Give it a project name, something like "My Lomboz Project". Press "Next".
5) In the "Java Settings" dialog, just press "Next" button again, no need to add any things here unless you know you will need some cool java libraries in your project.
6) In the "Create J2EE Module" dialog, you must add a "Web Module". Click the little "Add..." button and enter a module name called "myweb" or something.
7) Select the "Targeted Servers" tab, find your selected application server in the "Type:" dropdown (in my case Apache Tomcat v5.0.x) and press the little "Add..." button to add it to the list of targeted servers. I know, these dialogs are a bit strange, but you get used to them eventually...
8) If you added one (or more) servers, the "Finish" button activates, and you can click it.
9) The "Package Explorer" window should now show you the newly created project. Expand it and see "myweb" there. It should contain 2 jsp-files created for you.
10) To test the stuff:
a) Find the "Lomboz J2EE View" window and expand "My Lomboz Project".
b) Right click "myweb" and select "Deploy" and messages should start showing up in your "Console" window.
c) Start the application server (unless it's already started). If it's Tomcat, you can start it from the "Lomboz J2EE View" by right clicking the server item below "myweb" and select "Run Server" or "Debug Server".
d) Test the web page, in my case I run against http://localhost:8080/myweb/
Something like that should get you started, but it depends a bit on what kind of application server you've got. Good luck!
Visit and walk through the following great tutorial pages on the ObjectLearn website:
Creating Your First J2EE Project - http://www.objectlearn.com/support/docs/creatingFirstJ2EEProject.jsp
Adding a new J2EE Module to a Project - http://www.objectlearn.com/support/docs/addingNewContainer.jsp
Your First Web Application - http://www.objectlearn.com/support/docs/firstWebApplication.jsp
The same web site contains a number of other good tutorials, but the ones above are needed to get a grip of the IDE.