How to Install and Enable the JDK 7 Package for WAS 8.5 using imcl.exe

How to Install and Enable the JDK 7 Package for WAS 8.5 using imcl.exe

WAS_JDK_enable

Here in this article we will how we can install JDK7 package from IBM software repository and enable that JDK as the default JDK to be utilized by the WAS runtime.

Test Environment

Windows XP SP2
Installation Manager v1.5.2
WAS ND v8.5.5.0

Procedure

Step1: Create a keyring_file

Here in this step we are going to create a keyring_file which will store the passport advantage credentials related to the IBM repository site.

C:\Program Files\IBMInstallation Manager\eclipse\tools>imutilsc saveCredential -url http://www.ibm.com/software/repositorymanager/com.ibm.websphere.IBMJAVA.v70/repository.config -userName sudhirxxx@gmail.com -userPassword XXXX -keyring keyring_file -password XXXX 
Successfully saved the credential to the keyring.

The above message indicates the credentials were authenticate and saved successfully to keyring file.

Step2: List available packages

Here we are going to utilize the imcl utility to list the available packages from the IBM repository which we can download. Also please note we need to pass the keyring file and password for the same to extract the repository credentails to connect to it.

C:\Program Files\IBMInstallation Manager\eclipse\tools>imcl.exe listAvailablePackages -repositories http://www.ibm.com/software/repositorymanager/com.ibm.websphere.IBMJAVA.v70 -keyring keyring_file -password XXXX 
com.ibm.websphere.IBMJAVA.v70_7.0.1000.20120424_1539
com.ibm.websphere.IBMJAVA.v70_7.0.2000.20121005_1500
com.ibm.websphere.IBMJAVA.v70_7.0.4000.20130319_1844
com.ibm.websphere.IBMJAVA.v70_7.0.4001.20130510_2103
com.ibm.websphere.IBMJAVA.v70_7.0.5000.20131010_1516
com.ibm.websphere.liberty.IBMJAVA.v70_7.0.5000.20131010_1516

Step3: Install latest available JDK package

As per the output from the previous we can confirm that the latest available JDK package is of “com.ibm.websphere.IBMJAVA.v70_7.0.5000.20131010_1516”. Let’s download and install this package as shown below.

C:\Program Files\IBMInstallation Manager\eclipse\tools>imcl.exe install com.ibm.websphere.IBMJAVA.v70_7.0.5000.20131010_1516 -repositories http://www.ibm.com/software/repositorymanager/com.ibm.websphere.IBMJAVA.v70 -keyring keyring_file -password XXXX -installationDirectory D:WASInstallWAS
Installed com.ibm.websphere.IBMJAVA.v70_7.0.5000.20131010_1516 to the D:WASInstallWAS directory.

Step4: Check available JDK packages for Websphere Runtime

Let’s now try to check on the list of available jdk packages that we can use for the Websphere Application server runtime using the managesdk utility. As you can see from the below output we now have two JDK versions available (i.e 1.6_32 and 1.7_32).

D:\WASInstallWAS\bin>managesdk.bat -listAvailable 
CWSDK1003I: Available SDKs : 
CWSDK1005I: SDK name: 1.6_32 
CWSDK1005I: SDK name: 1.7_32 
CWSDK1001I: Successfully performed the requested managesdk task.

Step5: Check the Active JDK for Websphere profiles

Here we can check the JDK version that is currently actively used by the Websphere runtime profiles using the managesdk utility. As you can see from the below output all the Websphere Application server profiles (ie. DMGR profile and Application Server profile) are using the JDK v1.6_32.

D:\WASInstallWAS\bin>managesdk.bat -listEnabledProfileAll 

CWSDK1004I: Profile Dmgr01 : 
CWSDK1006I: PROFILE_COMMAND_SDK = 1.6_32 
CWSDK1008I: Node CORECellManager01 
SDK name: 1.6_32 CWSDK1009I: 
Server dmgr SDK name: 1.6_32 

CWSDK1004I: Profile AppSrv01 : 
CWSDK1006I: PROFILE_COMMAND_SDK = 1.6_32 
CWSDK1008I: Node CORENode01 SDK name: 1.6_32 
CWSDK1009I: Server nodeagent SDK name: 1.6_32 
CWSDK1009I: Server webserver1 SDK name: 1.6_32 
CWSDK1009I: Server webserver2 SDK name: 1.6_32 
CWSDK1009I: Server server1 SDK name: 1.6_32 
CWSDK1009I: Server server2 SDK name: 1.6_32 

CWSDK1004I: Profile AppSrv02 : 
CWSDK1006I: PROFILE_COMMAND_SDK = 1.6_32 
CWSDK1008I: Node CORENode02 SDK name: 1.6_32 
CWSDK1009I: Server nodeagent SDK name: 1.6_32 
CWSDK1009I: Server server1 SDK name: 1.6_32 
CWSDK1001I: Successfully performed the requested managesdk task.

Step6: Activate latest JDK package for DMGR profile

Here in this step we are going to active the JDK1.7_32 version for the DMGR profile using the managesdk utility as shown below.

D:\WASInstall\WAS\bin>managesdk.bat -enableProfile -sdkname 1.7_32 -profileName Dmgr01 
CWSDK1017I: Profile Dmgr01 now enabled to use SDK 1.7_32. 
CWSDK1001I: Successfully performed the requested managesdk task. - Verify the JDK 7 activation for the Dmgr01 profile D:WASInstallWASbin>managesdk.bat -listEnabledProfileAll 
CWSDK1004I: Profile Dmgr01 : CWSDK1006I: PROFILE_COMMAND_SDK = 1.7_32 
CWSDK1008I: Node CORECellManager01 SDK name: 1.7_32 
CWSDK1009I: Server dmgr SDK name: 1.7_32 

CWSDK1004I: Profile AppSrv01 : 
CWSDK1006I: PROFILE_COMMAND_SDK = 1.6_32 
CWSDK1008I: Node CORENode01 SDK name: 1.6_32 
CWSDK1009I: Server nodeagent SDK name: 1.6_32 
CWSDK1009I: Server webserver1 SDK name: 1.6_32 
CWSDK1009I: Server webserver2 SDK name: 1.6_32 
CWSDK1009I: Server server1 SDK name: 1.6_32 
CWSDK1009I: Server server2 SDK name: 1.6_32 

CWSDK1004I: Profile AppSrv02 : 
CWSDK1006I: PROFILE_COMMAND_SDK = 1.6_32 
CWSDK1008I: Node CORENode02 SDK name: 1.6_32 
CWSDK1009I: Server nodeagent SDK name: 1.6_32 
CWSDK1009I: Server server1 SDK name: 1.6_32 
CWSDK1001I: Successfully performed the requested managesdk task.

NOTE: managesdk.bat could be used to activate the latest JDK 7 package for all the profiles in the WAS distributed environment or for particular profiles.

Hope you enjoyed reading this article. Thank you..

3 COMMENTS

comments user
Mandar Shidhore

I have JDK 7 installed on my machine.
I have JDK 7 patch installed on Websphere 8.5.5.0

When I try to run the following command I get an error.

Command
managesdk.bat -enableProfile -profileName AppSrv01 -sdkName 1.7_64

Error
CWSDK0009E: Unexpected exception com.ibm.websphere.management.exception.AdminException: com.ibm.websphere.management.exception.AdminException: CWLCA0012E: The sdk 1.7_64 is not available on node XXXXXX

where XXXXXX is my node name.

Does anyone know how to fix this?

PS: Listing does tell me that I've JDK 7 installed.
C:Program Files (x86)IBMWebSphereAppServerbin>managesdk -listAvailable

CWSDK1003I: Available SDKs :
CWSDK1005I: SDK name: 1.6_64
CWSDK1005I: SDK name: 1.7_64
CWSDK1001I: Successfully performed the requested managesdk task.

comments user
novicejava1

Sorry for the delayed response.. were you able to resolve your issue. try running it from WAS ROOT installation directory