Eclipse IDE for J2EE 1.3 Development

类别:Java 点击:0 评论:0 推荐:
Eclipse IDE for J2EE 1.3 Development
(Tomcat 4.x, JBoss 3.x, MySQL 3.x) by Hao Wu Last modified: 04/18/2002

Purpose
This article covers setting up the following Open Source tools for J2EE 1.3 development.

- Tomcat 4.x for Servlet 2.3 and JSP 1.2
- JBoss 3.x for EJB 2.0, JMS 1.1, JCA 1.0, and JAXP 1.1
- MySQL 3.x for RDBMS Persistence
- Eclipse for Java IDE

* These instructions assume Windows platform. Linux needs slightly different URLs & similar steps.
* Following the order herein is recommended.

Coming Soon...
This documentation will get diligent update, catching up with latest builds of the tools. So please come back for updates.

- ANT integration with Eclipse.
- Code examples.
- XDoclet integration into Eclipse for EJB development.


Revision History

- 4/18, added "Upgrade" entry for each section.
JBoss 3.0.0, Release Candidate 1. Eclipse Milestone 5 (build 20020416).
Sysdeo version 0.96 and Genuitec version 1.0EA4 (for Eclipse M5).
- 4/02, (minor) Tomcat, version 4.0.4 beta 2. Sysdeo plugin, version 095.
- 3/23, (minor) Eclipse, updated with build 20020321.
- 3/20, JBoss 3.0.0, added Beta2 self-build notes
- 3/15, (minor) Eclipse, build 20020214 notes for working with EJB.
- 3/15, MySQL added, and its integration with JBoss.
- 3/13, (minor) JBoss, disabling clustering.
- 3/11, J2EE 1.3 with Eclipse (JBoss added).
- 2/20, JSP/Servlet with Eclipse and Tomcat.



Quick Reference

Software
(Click for details)

Current Version

Vendor

J2EE

Installation

JDK

1.4.0

Sun

J2SE 1.4

Install

Tomcat

(Open Source)

4.0.4 Beta 2

Apache

J2EE 1.3
(Servlet 2.3, JSP 1.2, etc.)

Unzip

JBoss

(Oepn Source)

3.0.0 Release Candidate 1

JBoss Group

J2EE 1.3
(EJB 2.0, JMS 1.1, JCA 1.0, JAXP 1.1, etc.)

Unzip
or
Build

MySQL

(Open Source)

3.23.49

MySQL AB

RDBMS

Install

Eclipse

(Open Source)

2.0, pre-release build 20020321

Eclipse

Java IDE

Unzip

Eclipse Tomcat Plugin

0.96

Sysdeo

(France)

IDE Plugin

Unzip

Eclipse JBoss Plugin

1.0EA4

Genuitec

IDE Plugin

Unzip



Installing JDK Version 1.4.0 Download

Get binary j2sdk-1_4_0-win.exe at http://java.sun.com/j2se/1.4/download.html
* Be sure to download the SDK, not just the JRE.

Documentation - Online - http://java.sun.com/j2se/1.4/docs/index.html
- Downloadable - http://java.sun.com/j2se/1.4/download.html Install

Run the executable which will install the following:

Java 2 SDK, SE v1.4.0 Java 2 Runtime Environment, SE v1.4.0 Java Plug-in 1.4.0 Java Web Start (1.0.1) Environment

Set variable JAVA_HOME to <install dir> (e.g. C:\jdk1.4).

Make sure <install dir>\bin is in your PATH (e.g. C:\jdk1.4\bin).

Test

Open a DOS windows, try java -version and you should get:

java version "1.4.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)



Installing Tomcat Version 4.0.4 Beta 2 Download

Get zip binary at http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0.4-b2/bin/jakarta-tomcat-4.0.4-b2-01.zip
(General download at http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release .)
* Also available is an Install version, which can run as Windows service. Not recommeded for development.

Documentation - Online - http://jakarta.apache.org/tomcat/tomcat-4.0-doc/index.html
- Local - (after installation) at %TOMCAT_HOME%\webapps\tomcat-docs\index.html
(Also accessible at http://localhost:8080/tomcat-docs/index.html, if Tomcat is started on port 8080)   Upgrade from Previous Version

- Rename your previous installation (say C:\jakarta-tomcat-4.0.2 to C:\jakarta-tomcat-4.0.2_old). And remove it after you get the new version up for a while.
- After the installation, copy the old server.xml (or preferrably, just the context you added) to the new.
- After the installation, go over other Tomcat related sections and check for applicable changes.

Install

Unzip to destination (say C:\, which makes <install dir> to be C:\jakarta-tomcat-4.0.4-b2-01).

Environment

Set variable TOMCAT_HOME to <install dir> (e.g. C:\jakarta-tomcat-4.0.4-b2-01).

Test

"cd %TOMCAT_HOME%\bin" and "startup" (startup.bat), you should see ---

Starting service Tomcat-Standalone
Apache Tomcat/4.0.4-b2
Starting service Tomcat-Apache
Apache Tomcat/4.0.4-b2

Now that Tomcat is up, access http://localhost:8080 from your browser.

Other o Installing Sysdeo Eclipse Tomcat Launcher Plugin (refer to the later section)
o Integrating Tomcat with JBoss (refer to the later section)

Installing JBoss Version 3.0.0 Release Candidate 1 (soon will add a seperate section on building 3.1.0 Alpha by yourself) Download Get zip binary from SourceForge at http://prdownloads.sourceforge.net/jboss/jboss-3.0.0RC1.zip
(General download at http://sourceforge.net/project/showfiles.php?group_id=22866.)
* Also available is a Tomcat-integrated version at http://prdownloads.sourceforge.net/jboss/jboss-3.0.0RC1_tomcat-4.0.3.zip. We prefer having seperated Tomcat instead of the integrated version, especially for development, for the following reasons:
Debugging web application is harder - need to do build into .ear instead of using Tomcat server.xml to point to code. Encountered class loader problem from Tomcat to integrate with JBoss. Documentation - Free online manual (somewhat outdated): http://www.jboss.org/online-manual/HTML/index.html
- JBoss documentation site: http://www.jboss.org/doco.jsp. Upgrade from Previous Version

- Rename your previous installation (say C:\jboss-3.0.0beta2 to C:\jboss-3.0.0beta2_old). And remove it after you get the new version up for a while.
- After the installation, go over other JBoss related sections and check for applicable changes.

Install

Unzip to destination (say C:\, which makes <install dir> to be C:\jboss-3.0.0RC1).

Environment

Set variable JBOSS_DIST to <install dir> (e.g. C:\jboss-3.0.0RC1).

Test

Make sure you don't have TOMCAT running, as it would conflict with JBoss over port 8080. (Integration is covered in a later section.)

"cd %JBOSS_DIST%\bin" and "run" (run.bat), you should see console output and eventually ---

14:44:35,075 INFO [Server] JBoss (MX MicroKernel) [3.0.0RC1 Date:200204150356] Started in 0m:22s:383ms

Check console or logfile (%JBOSS_DIST%\server\default\log\server.log), you should only see "INFO", "WARN" or "DEBUG" outputs.
Try http://localhost:8080, you should see Tomcat document and example - this is served through the embedded Jetty JSP/Servlet container (not Tomcat).
Also, try http://localhost:8082, you should see the JMX management console.

Other o Disable clustering: If you might ever run JBoss on your machine without a network, you want to do this.
- Create a subfolder %JBOSS_DIST\server\default\deployBackup.
- Move file %JBOSS_DIST%\server\default\deploy\cluster-service.xml away into %JBOSS_DIST%\server\default\deployBackup.
Installing Genuitec Eclipse JBoss Plugin (see below)
Integrating Tomcat with JBoss (see below)
Integrating JBoss with MySQL (see below)

Version 3.1.0 Alpha, self-build (or see a previous section for downloading 3.0.0 RC1)
Coming soon...

本文地址:http://com.8s8s.com/it/it11617.htm