How to setup a Java development environment

From Carboogle

This article explains how to setup a Java developement environment with Eclipse, Tomcat and plugins.

Contents

Requirements

  1. Java 2 Platform, Standard Edition (J2SE) : download JDK 5.0 Update 6
  2. Apache Tomcat : download Tomcat 5.5.15 Core and Tomcat 5.5.15 Administration Web Application
  3. Eclipse : download Eclipse and Web Tools
  4. Tomcat plugin : download 3.1 final

Installation

See this movie and explications below

J2SE

  1. Install the Java Development Kit
  2. Set your JAVA_HOME environment variable to the jdk installation dir
  3. Add <JAVA_HOME>/bin to your PATH

Tomcat

  1. Unzip tomcat in a folder
  2. Set CATALINA_HOME to tomcat installation dir
  3. Edit the file <CATALINA_HOME>\conf\web.xml to set listings parameter to true
<servlet>
   <servlet-name>default</servlet-name>
   <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
   <init-param>
       <param-name>debug</param-name>
       <param-value>0</param-value>
   </init-param>
   <init-param>
       <param-name>listings</param-name>
       <param-value>true</param-value>
   </init-param>
   <load-on-startup>1</load-on-startup>
</servlet>

Eclipse

  1. Extract eclipse archive in a folder
  2. Edit he file eclipse.ini to set JVM memory arguments. For example, if you have 1Go of RAM, you can set this file to :
-vmargs
-Xms256m
-Xmx512m

And if you have 512Mo of RAM :

-vmargs
-Xms256m
-Xmx384m

It depends on how do you use Eclipse...

Eclipse Tomcat plugin

  1. Unzip plugin in Eclipse plugin directory
  2. From the plugin folder, unzip DevLoader.zip to <CATALINA_HOME>\server\classes
  3. In the plugin you have two readme files to have more details about the installation, or you can see the movie above.

Usage

Creating a tomcat project

  1. See this movie to create a tomcat project in Eclipse

Mycila.com

Mycila projects

Other projects

ports

articles

lessons