This guide is for setting up a development environment for CS520 under Windows 2K/XP/Vista. All the software are available online for free. You may also get all the software and the screen capture videos from the MSDNAA software computer in the CS department office. The files are in the CS520 Software folder on the Windows Desktop. The total size of the files is about 370MB. You need to bring with you a flash drive or a writable CD.
Download and install the latest JDK from Sun
Microsystems - we only need the Java SE Development Kit
(JDK), not Java EE or NetBeans. Set a JAVA_HOME environment
variable to the directory where JDK is installed.
Download the latest Tomcat binary release from the Apache Project. Note that there are several packages available for download. You should download the ZIP file under the "Core" distribution. After downloading the file, unzip it to a local directory, e.g. c:\apache-tomcat-6.0.x. Also download the PostgreSQL JDBC driver (postgresql-<version_number>.jdbc4.jar) from PostgreSQL.org, and place it under the lib folder of the Tomcat directory, e.g. c:\apache-tomcat-6.0.x\lib.
Download the binary release of the PostgreSQL database server from PostgreSQL.org. There are two packages to choose from: One Click Installer and pgInstaller.
If you use the One Click Installer, simply follow the on-screen instructions and leave everything to default.
Unfortunately the One-Click Installer does not run on some versions of Windows (e.g. Windows XP SP3). If you can't get it to work on your computer, try the pgInstaller. After downloading the pgInstaller package, unzip it and run SETUP.bat. Follow the installation wizard:
It is recommended that you do not use the PostgreSQL superuser account postgres to perform day-to-day database operations, so create another user and a database with the same name as the user.
Download Eclipse IDE for Java EE Developers from Eclipse.org. Unzip it to a local directory, e.g. c:\eclipse, then start up Eclipse by double-click on eclipse.exe under the Eclipse folder. If you are using Eclipse for the first time, you will be asked to choose a folder to be Eclipse's workspace. Eclipse will store all your projects in that folder.
After Eclipse is started, install the Subclipse plugin as follows:
You should also install the Logfile Viewer plugin. The update site for the plugin does not seem to work any more, so you need to download it from SourceForge then unzip the content to a local directory, e.g. c:\logfile-viewer. The installation procedure is similar to installing Subclipse, except that
The New Project Wizard consists of several steps:
Note that for security reasons, the campus wireless network blocks the port used by Subversion, so if you try to access the repository on campus from your laptop, you have to connect your laptop to the wired network. Networks outside the campus should work just fine.
After the project is checked out, create a PostgreSQL database for CSNS, then use the following two SQL scripts under the db folder of the project to populate the database:
Copy build.properties.sample to build.properties, and modify build.properties according to your setup.
Create an Ant Builder for the project by right clicking on the project, then select Properties -> Builders -> New -> Ant Builder. In the Builder Properties window,
There are two things you need to be careful when creating the Ant builder. First, after setting the target for Auto Build, click the OK button, not the Apply button. Probably due to some bug, clicking the Apply button will undo the target setting instead of applying the setting. Second, after the Ant builder is created, refresh the project by right click on the project then select Refresh. Refreshing the project is important because Ant is an "external tool" to Eclipse, which means that Eclipse is not aware of the changes made by Ant until the project is refreshed.
Finally, right click on the project, then Run As -> Run on Server to run the project. If you can log into CSNS using one of the test accounts, the project is properly set up and you can start working on the code.
You may want to check out the following screen capture videos that demonstrate the installation processes: