Switching the Java SDK in WebSphere Application Server

You can switch to a different Java™ SDK in WebSphere® Application Server if required.

About this task

With WebSphere Application Server V8.5.5.13, and earlier releases, the default Java SDK is Java 6.0. With WebSphere Application Server V8.5.5.14, and later releases, the default Java SDK is Java 8.0. Use the steps described in this topic to switch to a different Java SDK if required; the steps show switching to the Java 7.0 SDK as an example, and you should adapt them as appropriate for the Java SDK you are switching to.

Procedure

  1. Stop the WebSphere Application Server.
  2. Install the Java 7.0 SDK by following these instructions: Installing IBM® WebSphere SDK Java Technology Edition Version 7.0 using the GUI.
  3. Run one of the following commands, depending on your operating system:
    • For UNIX or Linux, run WAS_HOME/bin/managesdk.sh -enableProfile -profileName profilename -sdkname 1.7_64. For example:
      /opt/IBM/WebSphere/WSRR/v8.5/bin/managesdk.sh -enableProfile -profileName WSRRSrv01 -sdkname 1.7_64
    • For Windows, run WAS_HOME/bin/managesdk.bat -enableProfile -profileName profilename -sdkname 1.7_64. For example:
      c:\IBM\WebSphere\WSRR\v8.5\bin\managesdk.bat -enableProfile -profileName WSRRSrv01 -sdkname 1.7_64
  4. Start the WebSphere Application Server.
  5. Optional: Change the Oracle JDBC driver.
    1. (WSRR V8.5.6.1) If you are using Oracle 12C as your database, it is recommended that you use the Java 7 version of the Oracle JDBC driver, ojdbc7.jar. To do this, you must copy ojdbc7.jar from the jdbc/lib directory of your Oracle installation into the WAS_HOME/WSRR/jdbcdrivers/Oracle on your WSRR server. If you are running WSRR in a cluster, you must copy the driver to every server in the cluster, then run the following script. From the WAS_HOME/WSRR/install/jython directory of the WSRR deployment manager, run the oraclejdbc.py script. Supply values for the node and server or cluster:
      /bin/wsadmin.sh –user username  –password password –lang jython  -f oraclejdbc.py  -cell cellName [-node nodeName -server serverName] | [-cluster clusterName] -javaver 7
    2. (WSRR V8.5.6.2) If you are using Oracle 12.1C as your database, you can use either the Java 7 version of the Oracle JDBC driver, ojdbc7.jar, or the Java 8 version, ojdbc8.jar. If you are using Oracle 12.2C, use ojdbc8.jar.

      To do this, you must copy the relevant .jar file from the jdbc/lib directory of your Oracle installation into the WAS_HOME/WSRR/jdbcdrivers/Oracle on your WSRR server. If you are running WSRR in a cluster, you must copy the driver to every server in the cluster, then run the following script. From the WAS_HOME/WSRR/install/jython directory of the WSRR deployment manager, run the oraclejdbc.py script. Supply values for the node and server or cluster:

      /bin/wsadmin.sh –user username  –password password –lang jython  -f oraclejdbc.py  -cell cellName [-node nodeName -server serverName] | [-cluster clusterName] -javaver javaVersion -jdbcver jdbcVersion
      where javaVersion and jdbcVersion have the value 7 or 8 as appropriate.