| 
         
     
     | 
     | 
    
  
    | 
    Eclipse IDE for J2EE 1.3 Development | 
   
  
     | 
   
  
     | 
   
  
    | 
     作者:未知  来源:月光软件站  加入时间:2005-2-28 月光软件站  | 
   
  
    
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 
| 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)
   |   
| 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...  |     |    |