
If you are not familiar with how WebSphere integrates with Java, refer to Getting Started with Java on WebSphere.
Before and after using the -setCommandDefault option to update the version of Java SDK being used by commands, you may want to use the managesdk -getCommandDefaults command to list the version of Java SDK that are being used by commands.
The managesdk.bat (Windows) or managesdk.sh (Linux) command with the -setCommandDefault option will update commands to use a certain version of Java SDK by default. In this example, commands will use version 1.8_64 of Java SDK by default.
AVOID TROUBLE
If you are prompted for a username and password, refer to username password and the soap.client.props sas.client.props ipc.client.props files.
${WAS_INSTALL_ROOT}/bin/managesdk.sh -setCommandDefault -sdkname 1.8_64
If the change is successful, the following should be displayed.
CWSDK1021I: The command default SDK name is now set to 1.8_64.
CWSDK1001I: Successfully performed the requested managesdk task.
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