Radu Cotescu's professional blog

g33k w17h pa45510n

Configuring Eclipse for J2EE Development

Starting to learn about Servlets and JSP from ”Head First Servlets and JSP 2nd edition”, I have reached a level where just editing my files from gedit wouldn’t suffice, as typos began to generate frustrations on my side. Although this is the recommended way by the book authors to build your projects while learning, which I totally agree until some point, when you start to write more code this might become rather uncomfortable.

Because the book recommends Tomcat as a web container, I decided to use Eclipse as an IDE for this. Otherwise I would have probably went for JDeveloper, as it provides you an end-to-end developing framework. Anyway, to be able to develop J2EE applications using Eclipse, you must follow these steps:

  1. download Eclipse for J2EE from here and install it;

  2. download JDK (it has JRE included in it) if you do not already have it from here or install it from your repositories if you use Linux, like i do (I have installed both JDK 5 and 6);

  3. download Apache Tomcat from here (5.5 is the version recommended in the book) or install it from you repositories;

  4. open and configure Eclipse:

    • go to Window - Preferences - Java - Installed JREs and add them from your install path (on Windows this is usually located in C\:Program Files\java\jre, for Linux just check the screenshot):

    Configure JREs in Eclipse

    • go to Window - Preferences - Server - Runtime Environments and add Tomcat from your install path (for Linux just check the screenshot for the usual path):

    Configure Tomcat in Eclipse

Now go on and build your applications!

Code, How To, Java

« Google Desktop, Google Chrome and Google Gadgets in Ubuntu How to fix Adobe AIR's installation on Ubuntu 9.04 »

Comments