Troubleshooting Java Runtime Environment Errors

When you use the Windowing environment of SAS (interactive SAS) in SAS 9.3, you might encounter error messages similar to the following in the SAS Log window when you run programs (for example: Proc javainfo; run;):
ERROR: Unable to attach current thread"
   ERROR: Unable to load the java virtual machine"
   ERROR: Proc javainfo did not run correctly
   ERROR: The Java proxy is not responding.
   ERROR: The Java proxy's JNI call to start the VM failed.
   ERROR: Java failed to start during the SAS startup.
These errors are typically related to issues with the Java Runtime Environment (JRE). To resolve these issues, follow these steps:
  1. Check your JREOPTIONS settings by submitting the following code in SAS:
    proc options option=jreoptions; 
    Your log output should be similar to the following:
    proc options option=jreoptions; run;
     JREOPTIONS=(             -DPFS_TEMPLATE=C:\Program
    Files\SASHome\SASFoundation\9.3\tkjava\sasmisc\sas.login.config\Program Files\SASHome\SASFoundation\
    -Dsas.ext.config=C:\Program Files\SASHome\SASFoundation\9.3\
    -Dsas.jre.libjvm=C:\PROGRA~2\Java\JRE16~1.0_2\bin\client\jvm.dll\PROGRA~1\SASHome\SASVER~1\picklist -Xms128m          )
                      Java Runtime Environment options
    NOTE: PROCEDURE OPTIONS used (Total process time):
          real time           0.01 seconds
          cpu time            0.00 seconds
    At the end of the log output, you should have a value that is similar to the following:
  2. Navigate to the location that is specified by -Dsas.jre.libjvm and verify the location of the jvm.dll file.
  3. To display the JRE version that is installed on your computer:
    Select Startthen selectRun and type cmd.
    Navigate to the bin directory by using the cd command. For example: C:\PROGRA~2\Java\JRE16~1.0_2\bin\ Following are examples of DOS commands that navigate to the bin location and verify the Java version:
    C:\>cd program files (x*
    C:\Program Files (x86)\Java>cd jre1.6.0_24
    C:\Program Files (x86)\Java\jre1.6.0_24>java -fullversion 
    java full version "1.6.0_24-b07"
    Type java –version
    Here is an example output from submitting the java —version command:
    java version "1.6.0_24"
    Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
    Java HotSpot(TM) 64-bit Server VM (build 19.1-b02, mixed mode)
  4. Verify the Windows short name in the sasv9.cfg file. Here is an example: Progra~1 . At the DOS command, type dir /x c:\prog*
    Your output should be similar to the following:
    Directory of c:\
    <DIR>	PROGRA~1     Program Files   
    <DIR>	PROGRA~2     Program Files (x86)                                                       
  5. Open your SAS configuration file in a text editor such as Notepad from C:\Program Files\SASHome\SASFoundation\9.3\nls\en\sasv9.cfg and locate the -jreoptions line. Ensure that all of the text is on one line of this file. Spaces are inserted at the start of each option, and each option begins with a hyphen (-). Also, verify the paths. Here is an example of the JREOPTIONS in the sasv9.cfg file:
    /*  Options used when SAS is accessing a JVM for JNI processing  */
  6. Look for error messages in the Java log located in C:\Documents and Settings\<userid>\Application Data\SAS\LOGS.
  7. From the Control Panel you must uninstall the JRE, reboot, delete the JRE directory, and then reinstall the JRE from the SAS Software Depot. To do this, perform the following steps:
    • From the Control Panel select Add/Remove Programsthen selectJava(TM) 6 Update 24 and remove the program. You can also perform this action from Programs and Features.
    • Reboot the PC.
    • From Windows Explorer, right-click on Start and select Open Windows Explorer or explore. Delete the JRE directory. Here is an example: C:\Program Files (x86)\Java\jre1.6.0_24)
    • Click on the Third Party Software Requirements for use with the SAS products page, and download the required JRE. See You can also click on the jre*.exe exe file that is located in the SAS Software Depot to install the JRE that is needed from your order. Here are some examples:
      <SAS Software Depot>\products\javaruntime__99170__win__xx__sp0__1
      <SAS Software Depot>\products\javaruntime__99170__wx6__xx__sp0__1
      Note: These 32–bit JRE installs are required even when the operating system is 64–bit.
  8. Ensure that the path to the JREHOME is correct in the sassw.config file located in the SASHOME directory (C:\Program Files\SASHome\sassw.config. You can verify the required version by looking at the SAS Third Party Software Requirements. See This file launches Java-based products. Here is an example of the contents:
       JREHOME=C:\Program Files (x86)\Java\jre1.6.0_24\bin\java.exe
       SASHOME=C:\Program Files\SASHome
       DPLMTREGLOC=C:\Program Files\SASHome\deploymntreg
       VJRHOME=C:\Program Files\SASHome\SASVersionedJarRepository
  9. Verify your Java settings and determine if you receive any error messages by submitting the following code in SAS:
    proc javainfo; run;
    Here is an example of the output that should appear in the log window:
    PFS_TEMPLATE = C:\Program Files\SASHome\SASFoundation\9.3\tkjava\sasmisc
    java.class.path = C:\PROGRA~1\SASHome\SASVER~1\eclipse\plugins\SASLAU~1.JAR
    java.class.version = 50.0 = Java(TM) SE Runtime Environment
    java.runtime.version = 1.6.0_24-b07 = C:\Program
    Files\SASHome\SASFoundation\9.3\tkjava\sasmisc\sas.login.config = C:\Program Files\SASHome\SASFoundation\
    java.specification.version = 1.6
    java.system.class.loader =
    java.vendor = Sun Microsystems Inc.
    java.version = 1.6.0_24 = Java HotSpot(TM) Client VM
    java.vm.specification.version = 1.0
    java.vm.version = 19.1-b02 = C:\PROGRA~1\SASHome\SASVER~1\eclipse\plugins\tkjava.jar
    sas.ext.config = C:\Program Files\SASHome\SASFoundation\9.3\
    sas.jre.libjvm = C:\PROGRA~2\Java\JRE16~1.0_2\bin\client\jvm.dll = C:\PROGRA~1\SASHome\SASVER~1\picklist = US
    user.language = en
    NOTE: PROCEDURE JAVAINFO used (Total process time):
          real time           0.01 seconds
          cpu time            0.01 seconds
    *** NOTE: JRE issues can also cause other SAS applications not to open 
    (for example, the SAS Installation Qualification Tools).