Step 1 - How To Set Up Your Development Environment

There's a lot of tools to install here. Why? Because each one of them will save tremendous amounts of development  and debugging time for a particular type of thing. Setting up your development environment will take longer than developing most things, once you get into it. Set aside 1-2 days for installation and familiarizing yourself with the environment.

Install Eclipse

Download the latest Eclipse ("Eclipse IDE for Java and Report Developers") from: http://www.eclipse.org/downloads/
Optional: If you're using JIRA, install Atlassian Connector For Eclipse. http://confluence.atlassian.com/display/IDEPLUGIN/Installing+the+Eclipse+Connector

Install Subclipse For Eclipse:

Follow the directions here to install Subclipse.

Install IceFaces for Eclipse

  1. In Eclipse, go to the Help menu and install the libraries available at the IceFaces update site: http://www.icefaces.org/eclipse-updates/
    If the above doesn't work, download and install IceFaces for eclipse: http://www.icefaces.org/main/downloads/ There used to be in the downloaded zip file is a PDF including information on how to get these into Eclipse.
  2. If this is the first time upgrading to this version of IceFaces, we'll also have to upgrade the IceFaces libraries.
    1. In the downloaded zip file is a PDF including information on how to create a new project.
    2. Follow the directions for creating a new project as far as downloading the right libraries and then add them to the project, removing the old IceFaces/JSF libraries.
    3. When I upgraded to IceFaces 1.8.1, I needed to get 3 libraries -- both IceFaces libraries and the sun JSF library.
    4. Make sure that in the build path export tab all 3 libraries are checked as being exported.
      1. Go to project properties -- "Java EE Module Dependencies" and put a checkmark next to all 3 libraries. Make sure to click "Apply" before you click "Ok" or the changes might not take effect.
  3.  

Install MySQL

http://dev.mysql.com/downloads/

It's easiest to install this on your local machine.

Install Tomcat 6

You can use Eclipse's server to install Tomcat.

  1. In Eclipse go to File -> New -> Server -> Next -> Next. If you have a server under "Server Runtime Environment" you can use it. If not, click "Add".
  2. In the menus, go to "Run" -> "Run Configurations..." Select the Apache Tomcat server you created. Switch to the "Arguments" tab. Under "VM Arguments" add in some text to increase the memory. When running on a 64 bit machine, I recommend using this to give it more than it will ever need: "-Xmx2500m -Xms256m -XX:PermSize=700m -XX:MaxPermSize=2024m". If that doesn't work (the JVM may complain that it can't allocate the memory), especially if you're using a 32 bit JVM, change it to this instead: "-Xmx1400m -Xms256m -XX:PermSize=150m -XX:MaxPermSize=200m"

  3. Now we have to add in your Apache Tomcat "Manager" webapp -- without it, the Survey Manager can't create surveys.
    1. Go to Window -> Show View -> Servers (if it's not in the list, click 'Other...' and add it
    2. In the Servers View, right click your Tomcat server and click "Open".
    3. At the bottom of the editor, click the "Modules" tab.
    4. Click "Add External Web Module..."
    5. Browse to your tomcat installation/webapps/manager and pick it.
  4. In your projects, notice your "Servers" project.
    1. Open that folder.
    2. Look for a folder named after your server that you picked in step 1. Go into that folder.
    3. Open "tomcat-users.xml" for editing.
      1. Just before </tomcat-users> at the end, add a line like this (you may choose any username or password that you want):
        <user username="tomcat" password="tomcat8675792pass" roles="manager"/>
      2. Why did we have to do this? In real deployments, WST edits this file automatically, but it requires a server reboot to take effect. But when the server reboots, Eclipse recopies this conf file back on top... So the program can never get access to it.
    4. Open up the "server.xml" file for editing.
      1.  Near the very end of the file, look for something that looks like "<Context ... path="/manager" ... />
      2. Just before that "/>" add this:
        privileged="true" antiResourceLocking="false" antiJARLocking="false"
      3. In my case, the final version looks like this but your docBase will have to be customized for your own installation:
        <Context docBase="/home/apowers/Programs/apache-tomcat/apache-tomcat-6.0.20/webapps/manager" path="/manager" reloadable="true" privileged="true" antiResourceLocking="false" antiJARLocking="false"/>
      4. We had to do this because without it, the manager wouldn't have the "privileged" controls it needs.

Install BIRT For Eclipse (optional, for visual report design)

Follow the directions to install this into eclipse here: http://download.eclipse.org/birt/downloads

(note that some of their directions are long since out of date -- where the directions say "europa" substitute the word "Galileo" and note that the UI has changed somewhat)

Install NetBeans (optional)

This is optional. You only need NetBeans if you are creating new database tables or if you want one of the WYSIWYG editors for IceFaces.

Download NetBeans -- it must be version 6.5.1 (no newer versions work with Visual Editor for IceFaces) .

Download and Install IceFaces for NetBeans . and open up "CIAB_Icefaces_Netbeans" -- there should be links from that folder to the eclipse folder. Eclipse will be easier to use for most code changes. Anytime you make a change in NetBeans, make sure to "Refresh" the project in Eclispe.

Install Selenium Cubic Test (optional, for testing)

We're currently testing out the Selenium Eclipse plugin, CubicTest. Download it and try it out -- we have automated tests in the eclipse project "SeleniumCubicTest".

Step 2 - Getting The Code
Next Step -> Step 2 - Getting The Code