Configuring SAS® 9.3 to Use an Alternative Java Runtime Environment or Java Development Kit

The following are steps necessary to configure SAS 9.3 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 and JDK Versions

The minimum JRE and JDK version requirements for use with SAS 9.3 are available above.

Notes:

  • A 32-bit JRE is required for SAS Foundation software and for SAS® desktop applications.
  • A 64-bit JDK is required for SAS® middle-tier applications.

Installing SAS 9.3 Fonts

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

To move the TrueType fonts to the alternate JRE:

  1. Navigate to the location of the original JRE that is configured with SAS 9.3. The default UNIX location for the JRE is the SASHOME/jre-installed-version/lib/fonts directory. SASHOME is the root directory where the SAS 9.3 installation is installed.
  2. Navigate to the fonts directory of the JRE. This directory is located under the lib directory. Under UNIX, the default location is SASHOME/jre-installed-version/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. Currently, there are more than 40 SAS TrueType fonts that are available in the fonts directory. All of the installed SAS TrueType fonts should have identical timestamps.

Note: These steps are not necessary in Windows operating environments. Under Windows, the JRE loads the fonts from the system fonts location.

SAS Foundation Software

SAS Foundation uses Java Native Libraries. The paths to these native libraries are contained within the JRE. The library path that is used by SAS Foundation software is set in the sasenv file, which is located in the SAS 9.3 installation directory.

UNIX Operating Environments

Under UNIX, you must modify your SAS session's JAVA_HOME environment variable to contain the path to the alternate JRE. JAVA_HOME, which you set in a SAS session, is defined in the sasenv file that resides in the SASHOME/SASFoundation/9.3/bin directory.

Modify the JAVA_HOME environment variable so it points to the alternate JRE, which contains the native libraries. Then your operating system's LIBPATH or LD_LIBRARY_PATH variable will pick up the correct path from JAVA_HOME.

Java 6 Examples

  • Solaris and Linux:
    JAVA_HOME=/usr/local/sas/SASHome/jre1.6.0_31
    export JAVA_HOME
  • AIX:
    JAVA_HOME=/usr/local/SASHome/jrel.6_SR8_FP1+IZ77436

Java 7 Example

  • Solaris and Linux:
    JAVA_HOME=/usr/local/SASHome/jre-7u15
    export JAVA_HOME
  • AIX:
    JAVA_HOME=/usr/local/SASHome/jre7.0.0.60_R3

 


 

Windows Operating Environments

Under Windows, add the path to the alternate JRE in the SAS system option, JREOPTIONS=, which is located in the configuration file sasroot\nls\language\sasv9.cfg. This SAS option includes all of 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= attribute for a Windows environment.

Note: All of the JREOPTIONS= parameters must be specified on a single line. However, for readability, this example shows the parameters on multiple lines.

-JREOPTIONS=(
  -Dsas.jre.libjvm=C:\PROGRA~2\Java\jre-installed-version\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.3\eclipse\plugins\TKJAVA~1.000\tkjava.jar
  -DPFS_TEMPLATE=!SASROOT\core\sasmisc\qrpfstpt.xml
  -Djava.class.path=C:\PROGRA~1\SAS\SASVER~1\9.3\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 so that it uses an alternate JRE, modify the -Dsas.jre.libjvm property (highlighted in the example above), based on the following examples:

Java 6 Example

-Dsas.jre.libjvm=C:\PROGRA~2\Java\JRE16~1.0_3\bin\client\jvm.dll

 

Java 7 Examples

  • Windows 64-bit systems:
    -Dsas.jre.libjvm=C:\PROGRA~2\Java\jre7\bin\client\jvm.dll
  • Windows 32-bit systems:
    -Dsas.jre.libjvm=C:\PROGRA~1\Java\jre7\bin\client\jvm.dll

Reconfiguring the Standard SAS Application Launcher

Many SAS applications and rich clients are invoked through the SAS Application Launcher. By default, the JRE location for the SAS Application Launcher is specified in the JREHOME= variable within the sassw.config file, which is located in a directory that has a path similar to C:\Program Files\SASHome\sassw.config. You can reconfigure a large percentage of SAS Java applications to use an alternate JRE just by editing this file. You can do that by modifying the JREHOME= variable that is shown in the following section of the file:

[properties]
JREHOME=C:\Program Files\Java\jre-installed-version\bin\java
SASHOME=C:\Program Files\SASHome
DPLMTREGLOC=C:\Program Files\SASHome\deploymentreg
VJRHOME=C:\Program Files\SASHome\SASVersionedJarRespository\9.3

To modify this file to use an alternate JRE, change the JREHOME= variable, as follows:

Java 6 Example

JREHOME=C:\Program Files(x86)\Java\jre1.6.0_31\bin\java

Java 7 Examples

  • Windows x64 systems:
    JREHOME=C:\Program Files(x86)\Java\jre1.7.0_15\bin\java
  • Windows 32-bit systems:
    JREHOME=C:\Program Files(x86)\Java\jre1.7.0_15\bin\java

Note: The 32-bit JRE is required. If you have a 64-bit operating system, the 32-bit Java applications are installed in the directory C:\Program Files(x86)\Java.

Reconfiguring SAS Rich-Client Platform Applications

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

JRE 6, Update 29 Example

-vm
C:\Program Files(x86)\jre1.6.0_31\bin\java

 

JRE 7, Update 15 Example

-vm
C:\Program Files(x86)\Java\jre1.7.0_15\bin\java

 

Note: The -vm parameter and the path must be on separate lines, and they must precede any -vmargs entries. For information about the .ini structure, see the Eclipsepedia Eclipse.ini webpage. For information about Eclipse runtime options, see The Eclipse runtime options webpage.

Reconfiguring SAS Remote Services

SAS Remote Services requires either a JRE or a JDK and can be reconfigured to use an alternate JRE or JDK, as shown in the following examples:

UNIX Operating Environments

Under UNIX, the level_env.sh script file that resides in SAS-configuration-directory/Levn/ contains two variables: JAVA_JRE_COMMAND and JDK_HOME. Set these variables to the paths for your alternate JRE or JDK, as shown in the following examples:

Java 6 Example

  • Solaris and Linux:
    JAVA_JRE_COMMAND=/usr/local/sas/SASHome/jre1.6.031/bin/java

    JDK_HOME=/usr/local/java/jdk1.6.0_31_x64
  • AIX:
    JAVA_JRE_COMMAND=/usr/local/SASHome/jre1.6_SR8_FP1+1Z77436/bin/java
    JDK_HOME=/usr/java6_64

Java 7 Example

  • Solaris and Linux:
    JAVA_JRE_COMMAND=/usr/local/SASHome/jre-7u15/bin/java

    JDK_HOME=/usr/local/java/jdk1.7.0_15_x64
  • AIX:
    JAVA_JRE_COMMAND=/usr/local/SASHome/jre7.0.0.60_R3/bin/java
    JDK_HOME=/usr/java7_64



Windows Operating Environments

Under Windows, the level_env.bat file that resides in SAS-configuration-directory\Levn\ contains two variables: JAVA_JRE_COMMAND and JDK_HOME. Set these variables to the paths for your alternate JRE or alternate JDK.

Java 6 Example

JAVA_JRE_COMMAND=C:\Program Files(x86)\Java\jdk1.6.0_31\jre\bin\java
JDK_HOME=C:\Program Files\Java\jdk1.6.0_31

Java 7 Example

set JAVA_JRE_COMMAND=C:\Program Files(x86)\Java\jrel.7.0_15\bin\java
set JDK_HOME=C:\Program Files\Java\jdk1.7.0_15

Java Development Kits and Java Application Servers

SAS® 9.3 Business Intelligence (BI) and SAS® Enterprise BI solutions require the installation of both a web application server and a Java Development Kit (JDK). SAS does not ship a Java Development Kit. You downloaded and installed a required JDK before your initial SAS installation. To use an alternate JDK, you need to reconfigure SAS and the web application server. The following sections provide instructions to modify the JDK version for specific web application servers under both UNIX and Windows.

JBoss Application Server under UNIX

Under UNIX, JBoss configurations save the location of the required JDK in two script files:

  • JBoss-home-directory/bin/SASServer1.sh: In this path, JBoss-home-directory specifies the root-level directory of the JBoss installation.
  • SAS-configuration-directory/level_env.sh: In this path, SAS-configuration-directory specifies the root-level directory of the SAS configuration.

Set the JAVA_HOME and the JDK_HOME variables to the path of the required JDK, as shown in these examples:

In the SASServer1.sh script:

JAVA_HOME=/data/jdk1.6.0_31

In the level_env.sh script:

JDK_HOME=/data/jdk1.6.0_31




JBoss Application Server under Windows

SAS uses Tanuki Software's Java Service Wrapper to install the JBoss application server as a Windows service. This 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, set the path to the alternate JDK in JBoss-home-directory\server\SASServer1\wrapper.conf, as shown in these examples. The tools.jar file is located in C:\Program Files\Java\jdk-installed-version\lib.

REM in C:\jboss-5.1.0.GA\server\SASServer1\wrapper.conf
          wrapper.java.command=C:\Program Files\Java\jdk1.6.0_31
          \bin\java

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

If your site does not have JBoss configured to run as a service, then you must edit the JBoss configuration. Under Windows, JBoss configurations save the location of the alternate JDK in two batch files:

  • JBoss-home-directory\bin\SASServer1.bat: In this path, JBoss-home-directory specifies the JBoss root-level directory.
  • SAS-configuration-directory\level_env.bat: In this path, SAS-configuration-directory specifies the root-level directory of the SAS configuration.

Set the JAVA_HOME and JDK_HOME variables (in their respective files) to the path of your alternate JDK, as shown in this example:

   REM Located in file C:\jboss-5.1.0.GA\bin\SASServer1.bat
SET JAVA_HOME=C:\Program Files\Java\jdk1.6.0_31

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




Oracle WebLogic under UNIX

Under UNIX, WebLogic configurations save the location of the required JDK in two script files:

  • SAS-configuration-directory/Levn/Web/SASDomain/bin/setDomainEnv.sh
  • SAS-configuration-directory/Levn/Web/SASDomain/bin/commEnvSAS.sh

In both of these files, set the JAVA_HOME variable to the path of the alternate JDK, as follows:

JAVA_HOME=/data/jdk1.6.0_31




Oracle WebLogic under Windows

Under Windows, WebLogic configurations save the location of the required JDK in two files:

  • SAS-configuration-directory/Levn/Web/SASDomain/bin/setDomainEnv.cmd
  • SAS-configuration-directory/Levn/Web/SASDomain/bin/commEnvSAS.cmd

In both of these files, set the JAVA_HOME variable to the path of your alternate JDK:

SET JAVA_HOME=C:\Program Files\Java\jdk1.6.0_31

Note: The WebLogic Node Manager can be installed to run as a service under Windows. The service is configured to use the JDK that WebLogic is configured with at the time of installation. If you configure WebLogic to run with an alternate JDK and you are running WebLogic Node Manager as a service, then you must re-install the service with the following configuration changes:

  1. Stop the Oracle WebLogic Node Manager Service.
  2. Uninstall the service by executing the following command from a Windows prompt:

    SAS-configuration-directory\Levn\Web\SASDomain\bin\uninstallNodeMgrSvc.cmd
  3. Then, execute the following command file:

    SAS-configuration-directory\Levn\Web\SASDomain\bin\installNodeMgrSvc.cmd

    This command installs the WebLogic Node Manager Service using the JDK that is specified in SAS-configuration-directory\Levn\Web\SASDomain\bin\comEnvSAS.cmd and in SAS-configuration-diretory\Levn\Web\SASDomain\bin\setDomainEnv.cmd.




IBM 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.
 

Back to Top