IBM Support

How to use the 'managesdk' command with WebSphere Application Server (WAS) v8.0 and later on the IBM i.

Troubleshooting


Problem

This document will discuss the command options provided with the managesdk command and how to use them to switch the JVM version for a WebSphere Application Server (WAS) v8.0 and later profile on the IBM i OS.

Environment

IBM i OS; IBM WebSphere Application Server Full Profile

Diagnosing The Problem

Use the WRKJVMJOB command and then option 5 to determine the current JVM version and bit level used by the WebSphere Application Server profile.

Resolving The Problem

The managesdk command is provided with the WebSphere Application Server product to assist users with performing the following functions:

  • List the software development kit (SDK) names that are available to a product installation.
  • List the SDK names that a specified profile is currently configured to use.
  • For each profile in a product installation, list the SDK names that the profile is currently configured to use.
  • Enable a profile to use a specified SDK name.
  • Enable all profiles in an installation to use a specified SDK name.
  • Get the SDK name that is used to configure new profiles.
  • Change the default SDK name that profiles use.
  • Get the SDK name that is used by scripts called from a product bin directory.
  • Change the SDK name that scripts in a product bin directory use by default. The SDK name is used when no existing profile name is specified and the default profile name is not applicable.

NOTE: The managesdk command requires the user profile to have *ALLOBJ special authority in order for the command to function properly.

The managesdk command provides functionality that replaces the enableJvm command used in WAS v7.0 and earlier releases. The enableJvm command is now deprecated at WAS v8.0 and later. For the WAS v8.0 and later products, the managesdk command should be used instead of the enableJvm command.

This document will provide a brief overview of the managesdk command's syntax and usage examples on the IBM i OS. For detailed information, please refer to the following URLs:

WAS v9.0
https://www.ibm.com/support/knowledgecenter/SSEQTP_9.0.0/com.ibm.websphere.base.doc/ae/rxml_managesdk.html

WAS v8.5
https://www.ibm.com/support/knowledgecenter/SS7JFU_8.5.5/com.ibm.websphere.express.iseries.doc/ae/rxml_managesdk.html

WAS v8.0
https://www.ibm.com/support/knowledgecenter/SS7JFU_8.0.0/com.ibm.websphere.express.iseries.doc/info/iseriesexp/ae/rxml_managesdk.html

Generic Syntax
managesdk -task [-parameter] [value]

The command-line tool validates that the requested task contains the required parameters and values. Parameters are not case-sensitive. However, values are case-sensitive. You must type values with the correct capitalization because the command-line tool does not validate the capitalization of the parameter values. Incorrect results can occur when the parameter value is not typed correctly.

Command location: /QIBM/ProdData/WebSphere/AppServer/<version>/<edition>/bin/
where...
<version> = V8, V85, or V9
<edition> = Express, Base, or ND

Available Tasks
NOTE: The -debug, -quiet, and/or -verbose parameter options can be appended to each task to obtain or suppress additional information in the command output.

-help
Displays detailed information about the parameters or values of each managesdk task.
i.e. managesdk -help

-listAvailable
Displays a list of all SDK names available to the product installation.
i.e. managesdk -listAvailable -verbose

-listEnabledProfile [-profileName profile_name]
Displays a list of all SDK names that specific profile is currently configured to use.
i.e. managesdk -listEnabledProfile -profileName default

-listEnabledProfileAll
Displays a list of all profiles in an installation and the SDK names that each profile is currently configured to use.
i.e. managesdk -listEnabledProfileAll

-enableProfile [-profileName profile_name] [-sdkname sdkName] [-enableServers] [-user user_name] [-password password_value]
Enables a profile to use a specified SDK name.
i.e. managesdk -enableProfile -profileName default -sdkname 1.8_64 -enableServers

-enableProfileAll [-sdkname sdkName] [-enableServers] [-user user_name] [-password password_value]
Enables all profiles in an installatino to use a specified SDK name.
i.e. managesdk -enableProfileAll -sdkname 1.8_64 -enableServers

-getNewProfileDefault
Displays the SDK name currently configured for all profiles created with the manageprofiles command.
i.e. managesdk -getNewProfileDefault

-setNewProfileDefault [-sdkname sdkName]
Changes the SDK name currently configured for all profiles created with the manageprofiles command.
i.e. managesdk -setNewProfileDefault -sdkname 1.8_64

-getCommandDefault
Displays the SDK name that script commands are enabled to use when no profile is specified by the command and when no profile is defaulted by the command.
i.e. managesdk -getCommandDefault

-setCommandDefault [-sdkname sdkName]
Changes the SDK name that script commands are enabled to use when no profile is specified by the command and when no profile is defaulted by the command.
i.e. managesdk -setCommandDefault -sdkname 1.8_64


**********************************
Additional managesdk command examples:
**********************************

How to change a WAS profile (default) to use JDK 6.0 64 bit for WAS v8.0 Express:
a. Sign into a 5250 green screen session with a user with *ALLOBJ special authority.
b. Execute the following CL Command: STRQSH
c. Execute the following Qshell commands:
cd /QIBM/ProdData/WebSphere/AppServer/V8/Express/bin

stopServer server1 -profileName default
where server1 is the server name and default is the profile name. NOTE: The server name does not need to be specified if the server and profile names are the same.

managesdk -enableProfile -profileName default -sdkname 1.6_64 -enableServers
d. You should see the following output after the command executes successfully.

> managesdk -enableProfile -profileName default -sdkname 1.6_64 -enableServers
  CWSDK1017I: Profile default now enabled to use SDK 1.6_64.                
  CWSDK1001I: Successfully performed the requested managesdk task.          
  $                                                                           
How to change a WAS profile (default) to use JDK 8.0 64 bit for WAS v8.5 Express:
a. Sign into a 5250 green screen session with a user with *ALLOBJ special authority.
b. Execute the following CL Command: STRQSH
c. Execute the following Qshell commands:
cd /QIBM/ProdData/WebSphere/AppServer/V85/Express/bin

stopServer server1 -profileName default
where server1 is the server name and default is the profile name. NOTE: The server name does not need to be specified if the server and profile names are the same.

managesdk -enableProfile -profileName default -sdkname 1.8_64 -enableServers
d. You should see the following output after the command executes successfully.

> managesdk -enableProfile -profileName default -sdkname 1.8_64 -enableServers
  CWSDK1017I: Profile default now enabled to use SDK 1.8_64.                
  CWSDK1001I: Successfully performed the requested managesdk task.          
  $                                                                 

How to set the WAS New Profile Default to use JDK 8.0 64 bit for WAS v8.5 Express:
a. Sign into a 5250 green screen session with a user with *ALLOBJ special authority.
b. Execute the following CL Command: STRQSH
c. Execute the following Qshell commands:
cd /QIBM/ProdData/WebSphere/AppServer/V85/Express/bin

managesdk -setNewProfileDefault -sdkname 1.8_64
d. You should see the following output after the command executes successfully.

> managesdk -setNewProfileDefault -sdkname 1.8_64                
  CWSDK1022I: New profile creation will now use SDK name 1.8_64.  
  CWSDK1001I: Successfully performed the requested managesdk task.
  $      

How to set the WAS Command Default to use JDK 6.0 64 bit for WAS v8.0 Express:
a. Sign into a 5250 green screen session with a user with *ALLOBJ special authority.
b. Execute the following CL Command: STRQSH
c. Execute the following Qshell commands:
cd /QIBM/ProdData/WebSphere/AppServer/V8/Express/bin

managesdk -setCommandDefault -sdkname 1.6_64
d. You should see the following output after the command executes successfully.

> managesdk -setCommandDefault -sdkname 1.6_64                    
  CWSDK1021I: The command default SDK name is now set to 1.6_64.  
  CWSDK1001I: Successfully performed the requested managesdk task.
  $                                                                                                                                                                                               

[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Platform":[{"code":"PF012","label":"IBM i"}],"Version":"7.1.0"}]

Document Information

Modified date:
29 January 2021

UID

nas8N1019730