Check to see if you have Java installed on your system by running the following commands:
C:\> java -version
$ java -version
If you do not have the correct version of Java installed, install the Java Run-Time Environment (JRE) or the Java Software Development Kit (SDK) from http://java.sun.com/j2se/1.4.2/download.html
In UNIX operating systems you typically modify a startup file like ~/.bash_login to set and export environment variables. In Windows XP, you go to
Start -> Control Panel -> System -> Advanced -> Environment Variables
in order to create or modify the named variables.
Set the JAVA_HOME environment variable to point to the base directory of your Java installation. This will enable Tomcat to find the right Java installation automatically. This may already be set up for you by your Java SDK installation, but you should check it.
|Windows:||Set the environment variable JAVA_HOME to "C:\j2sdk1.4.2_04" (do not include the quotes)|
Extend the PATH variable so as to include the Java commands.
|Windows:||Append the string ";C:\j2sdk1.4.2_04\bin" (include the semicolon but not the quotes) to the end of the System variable named Path.|
You should test that these variables are set correctly. In both Windows XP and *nix operating systems you can simply start a new shell and type the 'set' command to see your environment variables. Once the variables are set properly, run the java -version command once more as a final check.
Download the Sakai Demo
Get the demo from
When you unpack the demo archive appropriate for your operating system, you will have a folder called sakai-demo. This folder will contain its own Tomcat directory.
From the top Tomcat directory you can run the following startup commands:
Once your Tomcat is started, open a browser and enter the following URL (don't be too alarmed about delays - it can take Tomcat half a minute or more to load the entire Sakai application):
This will bring you to the Sakai gateway site. One user account is included in the demo, the administrator's account. Login using user id "admin" and password "admin".
New user accounts can be created from the admin's User tool, or using the "new account" link on the Sakai gateway site.
To stop the demo you can stop Tomcat with the following commands:
The data for a Demo installation is stored in a HypersonicSql database which is stored in memory and then written out to files when Tomcat is shut down. These files are located at:
Objects created and modified in runs of the Sakai demo will persist through server restarts.
HSQL is not appropriate for running Sakai in any sort of production environment. For these, we recommend MySql or Oracle (see the Source Installation Guide).
Things Not in the Demo
where <SMTP> is replaced with the name or ip address of an SMPT server that will accept mail from your Sakai app server.
The Java virtual machine's configuration is very important to tune for best performance. Unfortunately this is something of a black art. We recommend that you take the time to experiment with different memory and garbage collection settings and see what works best in your environment. The following details are offered only as samples or suggestions: before making any such changes to a production system please consult a systems administrator or local Java guru, if you're not such a person.
The standard way to control the JVM options when Tomcat starts up is to have an environment variable JAVA_OPTS defined with JVM startup options. One sample value might be:
JAVA_OPTS=-server -Xms512m -Xmx512m -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps
This is a fairly good starting point: it selects server mode, turns on garbage collection details, and sets the memory. We have found the best results when you set the min and max memory to the same values. 512 megs is not too much memory for Sakai; 1 gig is even better.