How to upgrade or update the Java Runtime Environment on the BlackBerry Enterprise Server

Article ID: KB17872

Type: Support Content

Last Modified: 12-12-2012

 

Product(s) Affected:

  • BlackBerry Enterprise Server
CollapseEnvironment
  • BlackBerry Enterprise Server 4.0 to 5.0 SP4
  • Java Runtime Environment (JRE) 1.5 and 1.6
CollapseOverview

How to upgrade the Java Runtime Environment

Upgrading the Java Runtime Environment on the BlackBerry Enterprise Server can affect five services: the BlackBerry Administration Service - Application Server, the BlackBerry Administration Service - Native Node Container, the BlackBerry Mobile Data System Connection Service, the BlackBerry Instant Messaging Connector, and the BlackBerry Monitoring Console.

To confirm the current location of the current installation of the Java Runtime Environment, see KB12450.

Warning: The following procedure involves modifying the computer registry. This can cause substantial damage to the Windows operating system. Document and back up the registry entries prior to implementing any changes.

Complete the following steps:
  1. Download the updated Java JRE 6 x86 version to be installed on the BlackBerry Enterprise Server from Oracle's website: http://www.oracle.com/technetwork/java/javase/downloads/index.html
  2. Confirm the current settings:
    • For Windows 2003 Servers: open a command prompt on the BlackBerry Enterprise Server by clicking Start > Run and type cmd . In the command prompt window typejava -version. This will report the current version.
    • For Windows 2008 Servers: on the BlackBerry Enterprise Server, browse to C:\Program Files\Java\<version>\bin\client. Right click jvm.dll and select Properties. Click on the Details tab and select Product Name.
    • Open the Registry on the BlackBerry Enterprise Server by clicking Start > Run and typing regedit. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BlackBerry MDS Connection Service. Double-click on ImagePath and locate the path to the jvm.dll.
  3. Right-click and select Export to export the Registry for these keys as a backup:
    • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BlackBerry MDS Connection Service
    • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BlackBerry Collaboration Service

    For BlackBerry Enterprise Server 5.0, export the following registry keys as well:

    • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BAS-AS
    • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BAS-NCC
    • HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Procrun 2.0\BBMonitoringConsole\Parameters\Java
    • Windows 64 bit Operating Systems the Apache registry key will be located
      • HKEY_LOCAL_MACHINE\ SOFTWARE\ Wow6432Node\Apache Software Foundation\Procrun 2.0\BBMonitoringConsole\Parameters\Java
  4. Shut down the BlackBerry Services that rely on Java and set them to Manual till the installation of Java is complete. Refer to Point 3 for services affected.
  5. Uninstall existing version of Java Runtime Environment and Java Development Kit via Add/Remove Programs.
  6. Perform the installation/upgrade.
  7. Update the settings in the Registry.
    • Log into the BlackBerry Enterprise Server as the BlackBerry service account (BESAdmin).
    • Open the Registry and browse to these keys:
      • BlackBerry MDS Connection Service: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BlackBerry MDS Connection Service
        Double-click the ImagePath string value and update the jvmpath variable to the updated location of jvm.dll. Do not change any other settings.

        The value of this REG_Expand_SZ should be similar to the following (some newer versions of Java are installed into \Java\jre6 directory , this is ok):
        "C:\Program Files\Research In Motion\BlackBerry Enterprise Server\MDS\bin\bmds.exe" -s jvmpath="C:\Program Files\Java\jre1.6.0_02\bin\client\jvm.dll" -XX:+DisableExplicitGC -Xss128K -Xmx768M -Xms128M classpathdir="C:\Program Files\Research In Motion\BlackBerry Enterprise Server\MDS\classpath\\" wrkdir="C:\Program Files\Research In Motion\BlackBerry Enterprise Server\MDS\Servers\BESNAME1\\" webserverdir="C:\Program Files\Research In Motion\BlackBerry Enterprise Server\MDS\webserver\\" -rbes "BESNAME1_MDS-CS_1"

      • BlackBerry Instant Messaging Connector: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BlackBerry Collaboration Service
        Double-click the ImagePath string value and update the jvmpath variable to the updated location of jvm.dll. Do not change any other settings.

        The value of this REG_Expand_SZ should be similar to the following (some newer versions of Java are installed into \Java\jre6 directory, this is ok):
        "C:\Program Files\Research In Motion\BlackBerry Enterprise Server\BBIM\bin\bcol.exe" -s jvmpath= "C:\Program Files\Java\jre1.6.0_02\bin\client\jvm.dll"-XX:+DisableExplicitGC -Xss64K -Xmx512M -Xms128M classpathdir="C:\Program Files\Research In Motion\BlackBerry Enterprise Server\BBIM\classpath\\" wrkdir="C:\Program Files\Research In Motion\BlackBerry Enterprise Server\BBIM\Servers\BESNAME1\\" -feature cwa -rimbes "BESNAME1_BBIM_1 "

      For BlackBerry Enterprise Server 5.0, update these Registry keys as well:

      • BlackBerry Administration Service Application Server: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BAS-AS\Parameters
        Double-click the JVM Library string value and enter the updated location of the jvm.dll. Do not change any other settings.

      • BlackBerry Administration Service Native Code Container:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BAS-NCC\Parameters
        Double-click the JVM Library string value and enter the updated location of the jvm.dll. Do not change any other settings.

      • BlackBerry Monitoring Console: HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Procrun 2.0\BBMonitoringConsole\Parameters\Java
        Double-click the JVM string value and enter the update location of the jvm.dll. Do not change any other settings.

  8. For BlackBerry Enterprise Server 5.0 to 5.0 SP3 the Java JCE Jurisdiction Policy Files will need to be replaced.

    • Download the Java JCE Jurisdiction Policy Files from Oracle's Sun Developer Network website: http://www.oracle.com/technetwork/java/javase/downloads/jce-6-download-429243.html

      • The download is a zip file so the files will need to be extracted to a common location
        • 2 Files will be needed: Local_Policy.jar and US_export_policy.jar
    • Navigate to the installation directory of Java JRE and locate the \lib\security directory and replace the Local_policy.jar and US_export_policy.jar files

    • Navigate to the installation directory of Java JRE and locate the  lib\security\jcedirectory and replace the Local_policy.jar and US_export_policy.jar files

    • Navigate to the installation directory for Java JDK and locate the jre\lib\security directory replace the Local_policy.jar and US_export_policy.jar files

    • Navigate to the installation directory for Java JDK and locate the jre\lib\security\jce directory replace the Local_policy.jar and US_export_policy.jar files

  9. After making the above modifications and pointing to the updated versions of the jvm.dll file, the services can then be changed to Automatic and started.
CollapseAdditional Information
Note: Download and install 32-Bit Java Runtime Environment for 32-bit and 64-Bit Windows operating systems. Newer versions of Java no longer install to the C:\Program Files\Java\jre1.6_update#.  Instead the installation path is C:\Program Files\Java\jre and C:\Program Files\Java\jdk respectivelyThe installation path no longer needs to be modified during the Java installation. It is important to note that the registry keys are modified correctly and the Java JCE files are replaced after the upgrade/installation of a newer version of Java. Prior to upgrading to Java, Research In Motion Customer Support should be contacted to verify that the version of Java being installed is currently supported. Incorrectly modifying the registry keys and not replacing the Java JCE files could cause BlackBerry Enterprise Server services to not start.

Disclaimer

By downloading, accessing or otherwise using the Knowledge Base documents you agree:

   (a) that the terms of use for the documents found at www.blackberry.com/legal/knowledgebase apply to your use or reference to these documents; and

   (b) not to copy, distribute, disclose or reproduce, in full or in part any of the documents without the express written consent of RIM.


Visit the BlackBerry Technical Solution Center at www.blackberry.com/btsc.