Several environment variables and related properties must be set for Java. For UNIX operating systems one typically modifies a startup file like
~/.bash_login to set and export shell variables while Mac users typically set and export environment variables in
.bash_profile. For Windows, go to
Start -> Control Panel -> System -> Advanced -> Environment Variables and set
JAVA_HOME via the GUI.
Set the JAVA_HOME environment variable to point to the base directory of your Java installation and add Java's
/bin directory to the PATH environment variable.
If the variable JRE_HOME is already set or if you want to use a particular JRE if you have more than one JRE installed on your machine then you'll want to set the JRE_HOME variable as well. JRE_HOME is what Apache Tomcat uses when it starts up, but it defaults to use JAVA_HOME if JRE_HOME is not set. In most cases, setting JAVA_HOME should cover both cases sufficiently.
Windows: append the string to the end of the
Path system variable
The default Java virtual machine (JVM) settings are insufficient for an application of Sakai's size. As a result several JVM parameters must be increased for Sakai to run, while others may need to be adjusted for optimal performance. At a minimum add the following property settings to your
JAVA_OPTS environment variable.
We recommend that you define these settings in Tomcat's
/bin directory in a file named
setenv.sh (Unix/Mac) or
setenv.bat (Windows). See the Tomcat section below for more details.
Additional required settings
Certain JSF tools (chat, portfolios, test & quizzes) do not compile properly in Java 1.6. The workaround requires adding the system property
allowArraySyntax in order to avoid deserialization bottlenecks in arrays (see
SAK-17578Getting issue details...
). Second, Tomcat 5.5.27+ enforces strict quote escaping, a change in *.jsp handling that has yet to be addressed in certain tools such as portfolios (see
SAK-15736Getting issue details...
). Finally, specify an HTTP user agent other than "Java/xxxxx" in order to resolve Google and other RSS feeds (see
SAK-10159Getting issue details...
SAK-13353Getting issue details...
SAK-18044Getting issue details...
Specify a Language and Locale (optional)
You can define the default language/locale when starting Sakai by setting the system properties
-Duser.region. For information on supported languages see the release notes or visit the i18N Work Group space.
Specify an HTTP Proxy (optional)
In environments where local network policy or firewalls require use of an upstream HTTP proxy/cache, Sakai needs to be configured accordingly. Otherwise components or services which use HTTP requests, such as the
BasicNewsService for RSS feeds in the News tool, cannot retrieve data from the target URLs. This can be fixed with the following