Raible's Wiki

Raible Designs
Wiki Home
News
Recent Changes

AppFuse

Homepage
  - Korean
  - Chinese
  - Italian
  - Japanese

QuickStart Guide
  - Chinese
  - French
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish
  - Japanese

User Guide
  - Korean
  - Chinese

Tutorials
  - Chinese
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish

FAQ
  - Korean

Latest Downloads

Other Applications

Struts Resume
Security Example
Struts Menu

Set your name in
UserPreferences


Referenced by
AppFuseDebug
AppFuseQuickStart
AppFuseQuickStart_cn
AppFuseQuickStart_fr
AppFuseQuickStart_it
AppFuseQuickStart_jp
AppFuseQuickStart_zh
AppFuseSupport
Articles
Articles_cn
...and 5 more




JSPWiki v2.2.33

[RSS]


Hide Menu

DevelopmentEnvironment


This is version 10. It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]


This page describes how to setup your development environment to compile/deploy AppFuse or StrutsResume from the command line. This is how I currently have things setup and what I advise clients to use when we use AppFuse as a baseline for webapp development.

Table of Contents

  • [1] Download - links to download the JDK, J2EE, Tomcat, Ant and MySQL
  • [2] Install - detailed instructions on where to extract/install all of the above packages
  • [3] Configure - how to configure your environment variables
  • [4] Additional Tips - other tools I recommend using

Download [#1]

  1. Download the latest JDK (J2SE SDK) from http://java.sun.com. As of 11/6/2003, this is 1.4.2. Choose the SDK link from under "Download J2SE v 1.4.2_02" for your respective platform.
  2. Download the latest J2EE Bundle from http://java.sun.com. As of 11/6/2003, this is 1.4 Beta 2. This will be used for compiling AppFuse or Struts-Resume (XDoclet requires javax.ejb.* and javax.servlet.* in the classpath when building).
  3. Download the latest Tomcat release from http://jakarta.apache.org/tomcat. At the time of this writing, it's 4.1.29. DON'T get the LE version or you'll have to add DBCP (database connection pool) and JavaMail (for e-mail) JARs.
  4. Download the latest Ant release from http://ant.apache.org. Currently, this is 1.5.4.
  5. Download the latest MySQL release from http://www.mysql.com. Currently, this is 4.0.16.

I usually put all these downloads in a "Downloads" folder - in fact, I plan on starting to pack around a CD with all of these libraries on them - nice to have when traveling to new clients and networks are slow.

Install [#2]

Make sure you have WinZip installed (for Windows) or gnutar for OS X before installing these packages.
  1. Create a "Tools" and "SDKs" folder on your hard drive. On Windows, I create these at c:\Tools and c:\SDKs. On *nix, I usually do /opt/dev/tools and opt/dev/sdks.
  2. Create Environment variables for these folders - SDKS_HOME and TOOLS_HOME (optional)
  3. Install the J2SE SDK (a.k.a. JDK) and J2EE bundle in the SDKs directory - keeping the directory names intact.
  4. Install Tomcat in the Tools directory - I usually name the install directory "jakarta-tomcat-x" where x is the current version (i.e. 4.1.29).
  5. Unzip/Install Ant in the Tools directory - "apache-ant-x" is what I use for the directory name.
  6. Install MySQL in the Tools directory. I usually just leave it named "mysql".

At this point, you should have a directory structure that looks something like the following:

SDKs -
    - j2eesdk-1.4-b2
    - j2sdk-1.4.2_02
Tools - 
    - apache-ant-1.5.4
    - jakarta-tomcat-4.1.29
    - mysql

Now we'll configure all these tools so that your Operating System knows they're installed.

Configure [#3]

I'll only show a Windows example and I'll assume the *nix folks are smart enough to figure it out for their system.

  1. To set Environment Variables in Windows, either go to Control Panel -> System or right-click My Computer -> Properties.
  2. I'm on Windows 2000 Server, so please update this with XP instructions if needed. Click on the Advanced Tab and then click the Environment Variables button.
  3. Put focus on the second box (System Variables) by clicking on one of the existing values.
  4. Enter the following variables:
    • SDKS_HOME = c:\SDKs
    • TOOLS_HOME = c:\Tools
    • JAVA_HOME = %SDKS_HOME%\j2sdk-1.4.2_02
    • J2EE_HOME = %SDKS_HOME%\j2sdkee-1.4-b2
    • ANT_HOME = %TOOLS_HOME%\apache-ant-1.5.4
    • CATALINA_HOME = %TOOLS_HOME%\jakarta-tomcat-4.1.29
    • MYSQL_HOME = %TOOLS_HOME%\mysql
    • Append to the PATH variable: %JAVA_HOME%\bin;%ANT_HOME%\bin;%CATALINA_HOME%\bin;%MYSQL_HOME%\bin

You should now be able to open a command prompt and type "java -version", "ant -version" or "mysql" and not get errors.

Additional Tips [#4]



Go to top   More info...   Attach file...
This particular version was published on 06-Nov-2006 13:52:32 MST by MattRaible.