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
- ANT integration with Eclipse.
- Code examples.
- XDoclet integration into Eclipse for EJB development.
- 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.
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
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.
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) EnvironmentSet 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).
TestOpen 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)
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.
- 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.
Unzip to destination (say C:\, which makes <install dir> to be C:\jakarta-tomcat-4.0.4-b2-01).
EnvironmentSet 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)- 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.
Unzip to destination (say C:\, which makes <install dir> to be C:\jboss-3.0.0RC1).
EnvironmentSet variable JBOSS_DIST to <install dir> (e.g. C:\jboss-3.0.0RC1).
TestMake 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.
本文地址:http://com.8s8s.com/it/it11617.htm