Network Deployment (Distributed operating systems), v8.0 > Reference > Commands (wsadmin scripting)


AdminSDKCmds command group

We can use commands and parameters in the AdminSDKCmds group in the Jython or Jacl scripting languages to manage software development kit configurations.

Use the commands and parameters in the AdminSDKCmds group for the AdminTask object, you can see what software development kits are not used by a node, get or set the default software development kit (SDK) for a node, and get or set an SDK for a server.

The AdminSDKCmds command group includes the following commands:

Every WAS version and operating system has a default SDK. For example, the default SDK for WAS Version 8 on workstations might be 1.6_32 for 32-bit operating systems and 1.6_64 for 64-bit operating systems. The name of an SDK that is installed at a particular computer location must be unique. On workstations, the default SDK is installed in a directory name that starts with ${WAS_HOME}/java for both 32- and 64-bit operating systems; for example, ${WAS_HOME}/java, ${WAS_HOME}/java_1.6_32, or ${WAS_HOME}/java_1.6_64.

If the managesdk command is used to change the SDK for a profile from a 31-bit (z/OS) or 32-bit (IBM i) SDK to a 64-bit SDK, and you are using third-party resource adapters, consider the following information to avoid potential problems. This information does not apply to any of the built-in resource adapters shipped with the WAS product, including the IBM WebSphere Relational Resource Adapter, the IBM WebSphere MQ Resource Adapter, or the IBM SIB JMS Resource Adapter as they have been fully tested to work with all IBM SDKs. Because resource adapters can use non-Java libraries containing platform-specific native code, it is possible that changing the SDK from 31-bit (z/OS) or 32-bit (IBM i) to 64-bit, or from 64-bit to 31-bit or 32-bit, might result in the resource adapter not functioning properly. If a third-party resource adapter is installed, either stand-alone or embedded in an enterprise application, on a server for which you intend to change the SDK, verify with the supplier of that resource adapter that any native libraries it uses are compatible with the selected SDK.


getNodeDefaultSDK

Use the getNodeDefaultSDK command to return the values of the default software development kit (SDK) for a node. The returned values include the Java home and SDK name.

Target object

None


Required parameters

-nodeName

Name of the node whose default SDK values you want returned. (String, required)


Optional parameters

None


Batch example...


Interactive example...



getSDKVersion

Run the getSDKVersion command to return the version number of the software development kit in use.

To get the SDK version in use in the cell, do not specify values for -nodeName, -serverName, or -clusterName.

Target object

None


Required parameters

None


Optional parameters

-nodeName

Name of the node whose SDK version you want returned. Do not specify a -clusterName value with a -nodeName value. (String, optional)

-serverName

Name of the server whose SDK version you want returned. If you specify a -serverName value, specify a -nodeName value as well and do not specify a -clusterName value. (String, optional)

-clusterName

Name of the cluster whose SDK version you want returned. If you specify a -clusterName value, do not specify a -nodeName or -serverName value. (String, optional)

-highest

Whether to return the highest SDK version number. By default, the lowest SDK version number is returned. (Boolean, optional)


Batch example...


Interactive example...



getServerSDK

Use the getServerSDK command to return the values of the software development kit for a server. If a valid SDK value is set for the server, the returned values include the Java home and SDK name of the default SDK for the server.

If no SDK value is set for the server, the command returns nothing for the Java home value because a variables.xml file does not exist for the server or a JAVA_HOME entry does not exist in the variables.xml file. For the SDK name, the command returns the node SDK name because the node SDK is the default SDK for a server when a valid SDK has not yet been set using the setServerSDK command.

Target object

None


Required parameters

-nodeName

Name of the node on which the server runs. (String, required)

-serverName

Name of the server whose SDK values you want returned. (String, required)


Optional parameters

-checkOnly

Whether to check only the variable. (Boolean, optional)


Batch example...


Interactive example...



getUnusedSDKsOnNode

Run the getUnusedSDKsOnNode command to return a list of the names of software development kits that a node is not using.

Target object

None


Required parameters

-nodeName

Name of the node whose unused SDK names you want returned. (String, required)


Optional parameters

None


Batch example...


Interactive example...



setNodeDefaultSDK

Use the setNodeDefaultSDK command to assign a default software development kit for a node. For the command, specify either the SDK Java home or the SDK name, but not both. If you change the node SDK, ensure that the options and properties for the Java command are compatible with the new SDK. See Configuring the JVM.

Target object

None


Required parameters

-nodeName

Name of the node for which to set a default SDK. (String, required)


Optional parameters

To set a node default SDK, specify the required -nodeName parameter with either -javahome or -sdkName. Both the -javahome and -sdkName parameters are optional but specify either one of the parameters.

To clear all SDK settings for all servers on a node, specify the required -nodeName parameter with either -javahome or -sdkName and with the optional -clearServerSDKs parameter set to true.

-javahome

Java home of the SDK that you want the node to use. If you specify a -javahome value, do not specify a value for the -sdkName parameter. (String, optional)

-sdkName

Name of the SDK that you want the node to use. If you specify a value for this -sdkName parameter, do not specify a value for the -javahome parameter. (String, optional)

-clearServerSDKs

Specifies to clear any SDK value settings for all servers on a node. (Boolean, optional)

To clear SDK value settings for all servers on a node, specify true for -clearServerSDKs. After the server SDK value settings are cleared, servers use the SDK value setting for the node.


Batch example...


Interactive example...



setServerSDK

Use the setServerSDK command to assign a software development kit for a server. The command creates a variables.xml file for the server that designates the SDK. For the command, specify either the cluster or both the node and server. Optionally specify either the SDK Java home or the SDK name, but not both.

To clear the server SDK assignment, do not specify values for SDK Java home or the SDK name. For example, if server1 is assigned SDK 1.6_32, run setServerSDK without the -javahome and -sdkName parameters to have no SDK assigned for server1. If you change the server SDK, ensure that the options and properties for the Java command are compatible with the new SDK. See Configuring the JVM.

Target object

None


Required parameters

None


Optional parameters

-nodeName

Name of the node on which the server runs. If you specify a -nodeName value, specify a -serverName value as well and do not specify a -clusterName value. (String, optional)

-serverName

Name of the server for which to set a SDK. If you specify a -serverName value, specify a -nodeName value as well and do not specify a -clusterName value. (String, optional)

-clusterName

Name of the cluster for which to set a SDK. If you specify a -cluster value, do not specify a -nodeName or -serverName value. (String, optional)

-javahome

Java home of the SDK that you want the server to use. If you specify a -javahome value, do not specify a value for the -sdkName parameter. (String, optional)

-sdkName

Name of the SDK that you want the server to use. If you specify a value for this -sdkName parameter, do not specify a value for the -javahome parameter. (String, optional)


Batch example...


Interactive example...


Use the wsadmin scripting AdminTask object for scripted administration
Configure the JVM


Related


ManagedObjectMetadata command group
Commands using wsadmin.sh

+

Search Tips   |   Advanced Search