Installing software for CSE 444 projects

If you'd like to do the CSE 444 mini-projects from home, you'll need to install the following:

For projects 1 and 2, you also need to access SQL Server on IISQLSRV. Please see how to tunnel SQL Server using SSH.

The rest of this guide will walk you through installing Java and Postgres on your Windows computer, so that it is configured similarly to the Windows computers in the CSE undergrad labs. The process on other systems is roughly analogous.

Before you begin…

Installing Java

The computers in the undergrad labs run Java 6. If you don't have a Java SDK, or have an earlier version, download and install the Java 6 SDK from Oracle.

Installing PostgreSQL and its JDBC driver

Follow these steps:

  1. Download PostgreSQL 8.4 for Windows. (Mac and Linux versions are also available from this page.)
  2. Install it with the default options. The installer will ask you to create a password for the "database superuser and service account." Remember this password; you'll need it later.
  3. Then, download the PostgreSQL JDBC driver and save it as C:\Program Files\psqlJDBC\postgresql-8.4-701.jdbc4.jar .
  4. To check that you installed the programs correctly, verify that the files C:\Program Files\PostgreSQL\8.4\bin\psql.exe and C:\Program Files\psqlJDBC\postgresql-8.4-701.jdbc4.jar exist.
  5. Add the JDBC driver to the Java class path (on Windows; on Mac or Linux):
    > set CLASSPATH=%CLASSPATH%;.;C:\Program Files\psqlJDBC\postgresql-8.4-701.jdbc4.jar
    The 444shell.cmd shell launcher script will already do this, assuming you saved the JDBC driver at the path given above.

Installing the JDBC driver for SQL Server

To install the SQL Server JDBC driver, download it from here, and save it as C:\Program Files\Microsoft SQL Server 2008 JDBC Driver\sqljdbc4.jar .

Adapting the PostgreSQL instructions

With two major exceptions, the PostgreSQL instructions for Lab machines still apply to working from home.

The first exception is that you can completely skip the sections titled "Creating a data folder" and "Starting and stopping PostgreSQL". The installer already created a data folder, so you don't need to create one yourself, and it set up Postgres to start and shut down along with the computer, so you don't need to start it explicitly.

The second exception is the way you log in to the database system. On Lab machines, you are not normally asked for a username or password when connecting to the database. This is because, when you use initdb to create a data folder, Postgres allows any local user to connect using any Postgres username without providing a password.

On the other hand, Postgres installed using the Windows installer will always prompt you for a username and password; you can use user postgres, whose password is the "database superuser password" you chose in setup. You'll need to specify this username explicitly when using Postgres' command-line tools, typically using the -U or --username option:

> psql -U postgres my_database

If you don't want to enter a username every time you run a Postgres command, run this command to create a Postgres user with the same name as your Windows username (the default of most Postgres tools):

> createuser -U postgres -s "%USERNAME%"

If you don't want to enter a password either, you can set that up, but it is an involved process. You can refer to previous quarters' versions of this page for two ways to do this, but both are a little hard to use.