[Java] Installing Eclipse and Lomboz

About

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.

Changes

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.

Purpose

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.

General Information

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.

Resources

Eclipse http://www.eclipse.org/
Lomboz http://www.objectlearn.com/
Eclipse plug-ins http://eclipse-plugins.2y.net/

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 Lomboz

Some settings really MUST be properly configured for Lomboz to work. Follow these instructions to the point.

Java Settings

You 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 Settings

Most 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!

Other Tutorials

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.

29 Comments

  • You also have to extract emf-sdo-runtime-I200406100948.zip to the parent of the &quot;eclipse&quot; directory. If there is an explicit note to this effect somewhere - I missed it.

  • Preston: Install EMF to run eclipse and lomboz?? Nah, I've not installed EMF at all.



    Robert and xuminfeng: Hmmm, that's strange, I'll look through the walkthrough again and see if I did anything different. Sorry about that.

  • Thanks for the feedback everyone. I've updated the article and corrected the errors. It should be OK now. I also fixed a few other typos that I found. Sorry for this, I hope the walkthrough will help people get started using Lomboz and Eclipse now.

  • I've extracted Eclipse 3.0 final (also tried with RC2) and Lomboz 3.0 RC2, and started eclipse. The plugin details page shows the plugin there, though the provider and plugin name aren't filled in. In &quot;Window&gt;Customize Perspective...&quot;, there's nothing about Lomboz, and there is nothing about Lomboz in Preferences either. Am I doing something wrong? Do I need to install EMF?

  • By installing eclipse, then EMF, then Lomboz it worked. However, I also switched from c:\Program Files\Eclipse to c:\Eclipse, so I don't know which change was the important one.

  • Awww, they released a new version! I'm going to download it and re-write the installation instructions (again) :)



    Will try to update this page in 24 hours.

  • There, article updated! Things should work way better now :)

  • I did exactly what you said. And everything is fine.



    Do you something about the error, when we try to use Lomboz j2EE Client Wizard or servlet?.



    This the error &quot;invalid thread access&quot;.



    Thanks.

  • Hmm, no, never seen that one. Sorry.

  • How come the lomboz wizard does not close when i click the finish button in the new lomboz j2ee project???



    by the way i am using eclipse 2.1 because i dont have emf yet

  • Thanks for sharing your notes. This configuration seems to have problems with JSP that exists in a sub directory. This configuration successfully builds the servlet in the j2src directory. When I set a break point it stops and reflect line number in Debug window but does not highlight the source code in the source window or keep up with the line in the source. I am using Eclipse 3.0 and Tomcat 5.0.25.

  • I integrated lomboz and eclipse as directed above.



    Does Lomboz have code sense or code help feature in JSP's? I tried it but could not get it.



  • I observed that JSP code sense/assist does'nt work if there is an error in the page (like invalid tld file path) ? Do you guys see anything like that?

  • When I try to start Tomcat 4.1.29 from Lomboz I get the following

    error:

    java.lang.NoClassDefFoundError: javax/management/MBeanRegistration



    I am using the configuration for Tomcat 4.1.0 in Lomboz and have added

    the mx4j-jmx (which contains this class - I checked this) in the

    server classpath panel (Preferences-Lomboz-Server Definitions). I have

    also tried it in Client and Project classpath, and all of them.



    Tomcat 4.1.29 itself runs fine (Startup.bat), using Lomboz with Tomcat

    5.0x also runs fine. Any ideas?



    Thx

    HW



    Complete stack:



    Jun 17, 2004 10:24:08 AM org.apache.coyote.http11.Http11Protocol init

    INFO: Initializing Coyote HTTP/1.1 on port 8080

    Exception during startup processing

    java.lang.reflect.InvocationTargetException

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at

    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

    at

    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

    at java.lang.reflect.Method.invoke(Method.java:324)

    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)

    Caused by: java.lang.NoClassDefFoundError:

    javax/management/MBeanRegistration

    at java.lang.ClassLoader.findBootstrapClass(Native Method)

    at java.lang.ClassLoader.findBootstrapClass0(ClassLoader.java:709)

    at java.lang.ClassLoader.loadClass(ClassLoader.java:284)

    at java.lang.ClassLoader.loadClass(ClassLoader.java:282)

    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)

    at java.lang.ClassLoader.loadClass(ClassLoader.java:235)

    at

    org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:941)

    at

    org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:857)

    at

    org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:941)

    at

    org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:857)

    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)

    at java.lang.ClassLoader.defineClass0(Native Method)

    at java.lang.ClassLoader.defineClass(ClassLoader.java:537)

    at

    java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)

    at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)

    at java.net.URLClassLoader.access$100(URLClassLoader.java:55)

    at java.net.URLClassLoader$1.run(URLClassLoader.java:194)

    at java.security.AccessController.doPrivileged(Native Method)

    at java.net.URLClassLoader.findClass(URLClassLoader.java:187)

    at

    org.apache.catalina.loader.StandardClassLoader.findClass(StandardClassLoader.java:621)

    at

    org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:958)

    at

    org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:857)

    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)

    at java.lang.Class.forName0(Native Method)

    at java.lang.Class.forName(Class.java:141)

    at

    org.apache.coyote.tomcat4.CoyoteConnector.initialize(CoyoteConnector.java:1097)

    at

    org.apache.catalina.core.StandardService.initialize(StandardService.java:579)

    at

    org.apache.catalina.core.StandardServer.initialize(StandardServer.java:2246)

    at org.apache.catalina.startup.Catalina.start(Catalina.java:511)

    at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)

    at org.apache.catalina.startup.Catalina.process(Catalina.java:180)

    ... 5 more



  • I did exactly what you said. I am using JBoss 3.2.3 &amp; while configuring JBoss through Lomboz in eclipse 3.0 I am getting following error....



    J2EE plugin Internal Error...

    Connected server can not found....



    &amp; am also not able to set default server using lomboz options...



    Can u please help me....

  • By: Ren Shao (zhirenshao)

    Date: 2004-07-15 03:34

    Subject: I know how to install Lomboz 3.0 successfully





    Having troubles with installing Lomboz 3.0? Just follow the steps below:



    1. Remove your Eclipse folder completely

    2. Unzip Eclipse

    3. Do not run Eclipse at this stage!!!!

    4. Unzip EMF 2.0 runtime

    5. Unzip Lomboz 3.0

    6. Run Eclipse for the first time, and you will be able to configure your Lomboz 3.0



    It is very important to note, after you unzip Eclipse, you can't run it after you unzip EMF and lomboz. If you have run Eclipse for the first time before you unzip EMF and lomboz, they will not appear in the 'Customize Perspective'

  • I use eclipse2.1.2+lomboz2.1.2+Jboss3.21 to develop EJB, but sometime it's strange

    1)deploy a Stateless SessionBean, it's ok

    2)when deploy a statefull SessionBean, i click

    &quot;deloy&quot;, it appears the following:

    Buildfile: ....

    init:

    ejb-jar:...

    deploy: ...

    deployTool:

    [ant] BUILD FAILED: file:F:/eclipse/workspace/CountEjb/Ejb/META-INF/build.xml:64: java.io.FileNotFoundException: F:\eclipse\workspace\CountEjb\Ejb\META-INF\deploy.xml



    This errors also appears in stateless SessionBean,but I can test the stateless SessionBean's client application successfully,

    while when test the statefull sessionbean's client application,it throws the exception:

    javax.naming.NameNotFoundException:

    some-JNDI_name not bound?



    Why these happen?? I am very confused???





  • Thanks for pointing me in the right direction! I had read several installation instructions that didn't mention EMF at all. After installing EMF, everything worked correctly without even needing to re-extract Lomboz.



    Again, thanks.

  • Thank you very much for sharing your knowledge. I did exactly what you said and everything is fine, even I get deployed and working one web module which contains several jsp's. However I have got errors when I have tried use taglib's. What I must do in order to get taglib's working?, I need struts taglib's in my project. Thanks in advance

  • exercellent. I love it. good source.

  • Hendra: Some programs like Oracle install older java versions on your system. Make sure class paths are set to 1.4.x, not 1.3.x because that will cause the problem you're describing.

  • Any ideas why my problem markers (in 2.1.3):

    A) show on the wrong lines

    B) show errors that aren't errors (like &quot;bla bla cannot be instatiated&quot; when it is in fact instantiated just fine)

    Thanks for a much clearer installation guide than I've seen before, by the way.

  • Do you guys have any trouble opening .jsp files using JSP Editor? The following error message is shown each time I try to open a jsp file.



    Unable to create part: JSP Editor



    I'll be grateful if you guys tell me how to fix it.

  • Hey,



    I have tried following the document step by step and also tried to extract all three Eclipse,EMF and Lomboz at one time and start...



    But nothing works..

    The moment i unzip EMF folder it gives me and update and successfully installs.

    However Lomboz does not.. it creates the 2 directories in the plugins folder but doen't show me an option in Window --&gt;Customize Perspective ...



    Anyone has any advice

  • excelent Notes

    Pls suggest me to how to build struts application using Lomboz

  • Hi,



    I am trying to set up Lomboz 3.0.1 with eclipse 3.0 and i get the below error when i try to open the Lomboz EJB Creation Wizard.



    Has anyone encountered this problem? how do i fix this?



    Plug-in &quot;com.objectlearn.jdt.j2ee&quot; was unable to instantiate class &quot;com.objectlearn.jdt.j2ee.ui.wizards.CreateEJBWizard&quot;.

  • Hey,



    I had a version problem before but now with the latest version i got the Lomboz running with no issue at all.. thanks!! this site is really helpful.



    However now i need to configure ServletExec with Lomboz as i need to run my JSP's on an IIS server .... can anyone advice ... or can i use say tomcat and then plug it into IIS..



    Help required!!

  • The problem was with the eclipse version. I was using M7 and EJB creation Wizard does not work with M7. I switched to eclipse 3.0 latest release and it works fine now.



    Thanks.

  • For robert:

    [quote]

    I did exactly what you said. However, in the step 5, I could not find any Lomboz items in the shortcut categories.

    Thanks![/quote]



    Try to go to Help -&gt; Software Update

    -&gt; Manage Configuration



    From that location you must enable Eclipse Modeling Framework.



    I hope this is help :D



    regards

Comments have been disabled for this content.