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.
export JAVA_OPTS='-server -Xms512m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=512m -XX:NewSize=192m -XX:MaxNewSize=384m -Djava.awt.headless=true -Dhttp.agent=Sakai -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false -Dsun.lang.ClassLoader.allowArraySyntax=true'
set JAVA_OPTS=-server -Xms512m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=512m -XX:NewSize=192m -XX:MaxNewSize=384m -Djava.awt.headless=true -Dhttp.agent=Sakai -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false -Dsun.lang.ClassLoader.allowArraySyntax=true
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 ). 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 ). Finally, specify an HTTP user agent other than "Java/xxxxx" in order to resolve Google and other RSS feeds (see , and ).
-Dsun.lang.ClassLoader.allowArraySyntax=true -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false -Dhttp.agent=Sakai
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.
In the case your locale were not fully supported in Java (as it happens with Basque or Mongolian languages) you should read this information:
Endorsed I18n Project
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