Bootstrap FreeKB - IBM WebSphere - List the version of Java being used by all profiles
IBM WebSphere - List the version of Java being used by all profiles

Updated:   |  IBM WebSphere articles

If you are not familiar with how WebSphere integrates with Java, refer to Getting Started with Java on WebSphere.

The managesdk.bat (Windows) or managesdk.sh (Linux) command with the -listEnabledProfileAll option can be used to list the version of Java being used by the nodes and application servers for each profile. 

~]# ${WAS_INSTALL_ROOT}/bin/managesdk.sh -listEnabledProfileAll

CWSDK1004I: Profile Profile01 :
CWSDK1006I: PROFILE_COMMAND_SDK = 1.7_32
CWSDK1008I: Node Node01 SDK name: 1.7_32
CWSDK1009I: Server Server01 SDK name: 1.8_32
CWSDK1009I: Server Server02 SDK name: 1.8_32

CWSDK1004I: Profile Profile02 :
CWSDK1006I: PROFILE_COMMAND_SDK = 1.7_32
CWSDK1008I: Node Node01 SDK name: 1.7_32
CWSDK1009I: Server Server01 SDK name: 1.8_32
CWSDK1009I: Server Server02 SDK name: 1.8_32

 

The -profileName option or the -listEnabledProfile option can be used to limit the output to a certain profile.

${WAS_INSTALL_ROOT}/bin/managesdk.sh -listEnabledProfileAll -profileName Profile01

 

The -verbose flag should return something like this.

~]# ${WAS_INSTALL_ROOT}/bin/managesdk.sh -listEnabledProfileAll -verbose

CWSDK1004I: Profile Profile01 :
CWSDK1006I: PROFILE_COMMAND_SDK = 1.7_32
 - com.ibm.websphere.sdk.version.1.7_32=1.7
 - com.ibm.websphere.sdk.bits.1.7_32=32
 - com.ibm.websphere.sdk.location.1.7_32=${WAS_INSTALL_ROOT}/java
 - com.ibm.websphere.sdk.platform.1.7_32=linux
 - com.ibm.websphere.sdk.architecture.1.7_32=x86_32
 - com.ibm.websphere.sdk.nativeLibPath.1.7_32=${WAS_INSTALL_ROOT}/lib/native/linux/x86_32/

 

Or,  the wsadmin.sh (Linux) or wsadmin.bat (Windows) command can be used to list the version of Java being used by an application server or deployment manager. This example uses the Jython scripting language (-lang jython).

~]# /opt/WebSphere/AppServer85/profiles/profile01/bin/wsadmin.sh -lang jython -c "print AdminTask.getServerSDK('[-nodeName Node01 -serverName Server01]')"
[[javahome ${JAVA_LOCATION_1.8_64}] [sdkname 1.8_64] ]

 

When starting your WebSphere network deployment manager (dmgr), node, or application server, the HPEL or SystemOut log should contain something like this, where the Java version matches the Java version being returned by the managesdk command.

Java version = 1.8.0_211, Java Runtime Version = 8.0.5.37 - pxa6480sr5fp37-20190618_01(SR5 FP37), Java Compiler = j9jit29, Java VM name = IBM J9 VM
Java Home = /opt/WebSphere/AppServer90/java/jre

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 927786 in the box below so that we can be sure you are a human.