Configuring SAS® 9.2 to Use an Alternative JRE or JDK

The necessary steps to configure SAS 9.2 products to run with an installation of a Java Runtime Environment (JRE) or Java Development Kit (JDK) that is different from the JRE or JDK that was used during the initial installation and configuration process.

Supported JRE versions

The supported JRE versions for SAS 9.2 m3 can be found above. Note that a 32-bit JRE is required for SAS® Foundation and SAS® Rich Client Platform applications.

Installing SAS 9.2 Fonts

SAS 9.2 uses TrueType fonts to provide quality printing and font display across multiple platforms. During the installation and configuration of SAS 9.2, some of these TrueType fonts are installed to the required Java Runtime Environment. When SAS 9.2 is configured to use an alternate JRE, these TrueType fonts must be installed to the new JRE.

Perform the following steps to move the SAS installed TrueType fonts:

  1. Navigate to the location of the original JRE that was configured with SAS 9.2. The following example shows the default location for a Microsoft Windows installation:

    C:\Program Files\Java\jre1.5.0_12

    The default location of the JRE with UNIX installations is under the $SASHOME directory. The $SASHOME directory is the root directory where the SAS 9.2 installation was performed.

  2. Navigate to the fonts directory of the JRE. The fonts directory is located below the lib directory of the JRE. The following example shows the default location for a Microsoft Windows installation:

    C:\Program Files\Java\jre1.5.0_12\lib\fonts

  3. Copy or move all of the SAS® TrueType fonts from the fonts directory of the original JRE to the fonts directory of the new JRE. At the time of this writing there are 40 SAS TrueType fonts that are available in the JRE's fonts directory. All of the installed SAS TrueType fonts should have identical timestamps.

SAS Foundation

SAS Foundation uses Java Native Libraries. These native libraries are contained within the JRE.

UNIX

You must modify your library path on UNIX hosts to contain the location of the native libraries of the alternate JRE. The library path used by SAS Foundation is set in the "sasenv" file which is located in the SAS 9.2 installation directory. The environment variable JAVA_HOME is set in the sasenv file.

# in /usr/local/SAS_9.2_INSTALL/SASFoundation/9.2/bin/sasenv
JAVA_HOME=/data/SAS_9.2_INSTALL/jre1.5_SR5/jre
export JAVA_HOME

LIBPATH=$JAVA_HOME/bin:$JAVA_HOME/bin/j9vm:$SAS_INSTALL_ROOT/sasexe:$LIBPATH
export LIBPATH

 

Modify JAVA_HOME to update your library path to contain the native libraries of the alternate JRE.

# in /usr/local/SAS_9.2_INSTALL/SASFoundation/9.2/bin/sasenv
JAVA_HOME=/data/SAS_9.2_INSTALL/jre1.5_SR6b/jre
export JAVA_HOME

 


 

Windows

The JRE configuration for SAS Foundation is managed through the JREOPTIONS SAS option. This SAS option includes all the Java options that are used when SAS invokes a Java Virtual Machine (JVM). The -Dsas.jre.libjvm property identifies the shared library for the JVM to use. The following example shows the default JREOPTIONS for a Windows machine. The example is shown on several lines for readability, the JREOPTIONS must be kept on a single line in the SAS configuration file.

-JREOPTIONS=(
  -Dsas.jre.libjvm=C:\Program Files\Java\jre1.5.0_12\bin\client\jvm.dll
  -Djava.security.policy=!SASROOT\core\sasmisc\sas.policy
  -Dsas.ext.config=!SASROOT\core\sasmisc\sas.java.ext.config
  -Dsas.app.class.path=C:\PROGRA~1\SAS\SASVER~1\9.2\eclipse\plugins\TKJAVA~1.000\tkjava.jar
  -DPFS_TEMPLATE=!SASROOT\core\sasmisc\qrpfstpt.xml
  -Djava.class.path=C:\PROGRA~1\SAS\SASVER~1\9.2\eclipse\plugins\SASLAU~1.000\SASLAU~1.JAR
  -Djava.system.class.loader=com.sas.app.AppClassLoader
  -Djava.security.auth.login.config=!SASROOT\core\sasmisc\sas.login.config
  -Dtkj.app.launch.config=!SASROOT\picklist )

 

To change SAS Foundation to use Java 5 update 15, change the first option as follows:

-Dsas.jre.libjvm=C:\Program Files\Java\jre1.5.0_15\bin\client\jvm.dll

 

On Windows, the configuration file is located in !SASROOT\nls\LANG\SASV9.CFG.

Reconfiguring the Standard SAS Application Launcher

Reconfiguring the Standard SAS Application Launcher

Many SAS® applications and rich clients are invoked through the SAS Application Launcher. These applications are configured through the product.ini file located in the product directory. For SAS 9.2, a top-level configuration file named sassw.config is introduced. An example location for the file is C:\Program Files\SAS\sassw.config. By default, the JRE location is specified as the JREHOME property within this file. A large percentage of SAS Java applications can be reconfigured to use an alternate JRE just by editing this file. Refer to the following Windows example:

[properties]
JREHOME=C:\Program Files\Java\jre1.5.0_12\bin\java.exe
SASHOME=C:\Program Files\SAS
DPLMTREGLOC=C:\Program Files\SAS\deploymentreg
VJRHOME=C:\Program Files\SAS\SASVersionedJarRespository\9.2

To change the value for Java 5 update 15, change the first option as follows:

JREHOME=C:\Program Files\Java\jre1.5.0_15\bin\java.exe

Reconfiguring SAS Rich Client Platform Applications

For SAS 9.2 client applications that are based on the Eclipse Rich Client Platform, you can reconfigure the application to use an alternate JRE by editing an INI file. The INI file is located in the same directory as the application. For example, to update SAS® Data Integration Studio (distudio.exe), edit the distudio.ini file in the same directory. Change the -vm argument to the path for the alternate JRE. Refer to the following example:

-vm
C:\jdk1.6.0_03\bin\java.exe

Note: The -vm string and the path must be on separate lines and they must precede any -vmargs entries. For information about the INI file structure, see the Eclipse.ini Web page. For information about Eclipse runtime options, see the Eclipse runtime options Web page.

Reconfiguring SAS Remote Services

SAS 9.2 servers such as SAS® Remote Services require a JRE or JDK. These servers can be reconfigured to use an alternate JRE or JDK.

UNIX

File $SAS_CONFIG/Lev1/level_env.sh contains two variables that can be edited to use an alternate JRE or JDK:

# in /opt/SAS/Config/Lev1/level_env.sh
JAVA_JRE_COMMAND=/usr/local/java/jre1.5.0_15/bin/java

# also check the JDK_HOME variable
JDK_HOME=/usr/local/java/jdk1.5.0_15_x64




Windows

On Windows platforms, the file $SAS_CONFIG\Lev1\level_env.bat contains two variables that can be edited to use an alternate JRE or JDK:

REM in C:\SAS\Config\Lev1\level_env.bat
JAVA_JRE_COMMAND=C:\Program Files\Java\jdk1.5.0_15\jre\bin\java

REM also check the JDK_HOME variable
JDK_HOME=C:\Program Files\Java\jdk1.5.0_15

Java Development Kits and Java Application Servers

SAS® 9.2 Business Intelligence (BI) and SAS® Enterprise BI Server require the installation of a Java application server and a Java Development Kit (JDK). SAS does not ship Java Development Kits. Customers must download and install the required JDK before installing SAS. After installing the JDK, SAS and the application server are configured to use the supplied JDK. It might become necessary to change the version of the Java Development Kit required by SAS 9.2. Instructions are provided based on the Java application server.

JBoss on UNIX

JBoss configurations on UNIX platforms save the location of the required JDK in two places. The first place is the $JBOSS_HOME/bin/SASServer1.sh script and the second place is the $SAS_CONFIG/level_env.sh script. $JBOSS_HOME is the root level directory of the JBoss installation and $SAS_CONFIG is the root level directory of the SAS configuration. The following variables in their corresponding files should be modified to contain the location of the desired JDK:

# in file /opt/jboss-4.2.0.GA/bin/SASServer1.sh
JAVA_HOME=/data/jdk1.5.0_12

# in file /opt/SAS/Config/Lev1/level_env.sh
JDK_HOME=/data/jdk1.5.0_12




JBoss on Windows

SAS uses Tanuki Wrapper to install the JBoss application server as a service on Windows platforms. Tanuki Wrapper uses a configuration file named wrapper.conf to identify the location of the Java executable and the location of the tools.jar file for the JDK. If JBoss is configured to run as a service, then edit $JBOSS_HOME\server\SASServer1\wrapper.conf. Refer to the following example:

REM in C:\jboss-4.2.0.GA\server\SASServer1\wrapper.conf
wrapper.java.command=C:\Program Files\Java\jdk1.5.0_15\bin\java

REM also set the location of tools.jar
wrapper.java.classpath.2=C:\Program Files\Java\jdk1.5.0_15\lib\tools.jar

If your site does not have JBoss configured to run as a service, then edit the JBoss configuration. JBoss configurations on Windows platforms save the location of the alternate JDK in two places just as JBoss on UNIX. The first file is $JBOSS_HOME\bin\SASServer1.bat and the second file is $SAS_CONFIG\level_env.bat. $SAS_CONFIG is the location of the SAS configuration. The following variables in their corresponding files should be modified to contain the location of the desired JDK:

REM in file C:\jboss-4.2.0.GA\bin\SASServer1.bat
SET JAVA_HOME=C:\Program Files\Java\jdk1.5.0_15

REM in file C:\SAS\Config\Lev1\level_env.bat
SET JDK_HOME=C:\Program Files\Java\jdk1.5.0_15




WebLogic on UNIX

WebLogic configurations on UNIX platforms save the location of the required JDK in two files. The first file is $SAS_CONFIG/Lev1/Web/SASDomain/bin/setDomainEnv.sh. The second file is $SAS_CONFIG/Lev1/Web/SASDomain/bin/commEnvSAS.sh. The JAVA_HOME variable should be modified to contain the location of the desired JDK:

# in file /opt/SAS/Config/Lev1/Web/SASDomain/bin/setDomainEnv.sh
JAVA_HOME=/data/jdk1.5.0_12

# in file /opt/SAS/Config/Lev1/Web/SASDomain/bin/commEnvSAS.sh
JAVA_HOME=/data/jdk1.5.0_12




WebLogic on Windows

WebLogic configurations on Windows platforms save the location of the required JDK in two files. The first file is $SAS_CONFIG\Lev1\Web\SASDomain\bin\setDomainEnv.cmd. The second file is $SAS_CONFIG\Lev1\Web\SASDomain\bin\commEnvSAS.cmd. The JAVA_HOME variable should be modified to contain the location of the desired JDK:

REM in file C:\SAS\Config\Lev1\Web\SASDomain\bin\setDomainEnv.cmd
SET JAVA_HOME=C:\Program Files\Java\jdk1.5.0_15

REM in file C:\SAS\Config\Lev1\Web\SASDomain\bin\commEnvSAS.cmd
SET JAVA_HOME=C:\Program Files\Java\jdk1.5.0_15

The WebLogic Node Manager can be installed to run as a service on Windows platforms. The service is configured to use the JDK that WebLogic is configured with at the time of installation. If you have configured WebLogic to run with an alternate JDK and are running WebLogic Node Manager as a service, then you must complete the following steps to reinstall the service with configuration changes:

  1. Stop the BEA WebLogic Node Manager Service.
  2. Execute $SAS_CONFIG\Lev1\Web\SASDomain\bin\uninstallNodeMgrSvc.cmd to uninstall the BEA WebLogic Node Manager Service.
  3. Execute $SAS_CONFIG\Lev1\Web\SASDomain\bin\installNodeMgrSvc.cmd. This command installs the BEA WebLogic Node Manager service using the JDK specified in commEnvSAS.cmd and setDomainEnv.cmd.



WebSphere

WebSphere configurations are installed with the required JDK.

Recommended Resources


Explore our training options, including on-site classroom, live web, e-learning and one-on-one mentoring.


Validate your SAS knowledge and skills by earning a globally recognized credential from SAS.


Explore documentation on topics of interest to SAS administrators.