Show version command

You can use the showVersion command-line interface (CLI) to get the version of any .jar files that are installed in the Registry Services application. You can also use this command to get the version of the current installed runtime application.

By default, this command returns the version of the .jar files that are installed in the JazzSM_HOME/lib/frs folder.

Command syntax

The showVersion CLI syntax varies according to the environment in which it is run:
  • frs.bat showVersion [-jarslocation jars_path] [-ear] [-properties properties_file]
  • ./frs.sh showVersion [-jarslocation jars_path] [-ear] [-properties properties_file]

Parameters

Table 1 lists the parameters that are used with the showVersion CLI and provides their description.

Table 1. Parameters used in the showVersion CLI
Parameter Value Description
[-jarslocation] jars_path

The -jarslocation parameter defines that the showVersion command returns the version of all JAR files that are in the directory you specified.

[-ear] This parameter requires no value

The -ear parameter defines that the showVersion command must return the version of the Registry Services application that is installed.

[-properties] properties_file

This value defines that the .properties file must act as the source of Registry Services properties. This parameter is optional. If you do not specify this parameter, this command uses the default REGISTRY_HOME\etc\CLI.properties file as the source of properties.

A mandatory property becomes optional when you configure Registry Services through the CLI. This property is package.dir. Registry Services can determine the location of the file this property specifies based on the location of frs.bat or frs.sh scripts.

However, if you specify this property in the .properties file, it takes precedence over automatic determination.

Sample

frs.bat showVersion -jarslocation C:/WebSphere/runtimes/com.ibm.ws.admin.client.jar
./frs.sh showVersion -ear

Return codes

The showVersion command prints a return code when it finishes running so you can have details of the result achieved. Table 2 provides the return codes that you can get by the end of the showVersion command run and their respective descriptions.

Table 2. Return codes of showVersion command run
Return code Description
0 The showVersion command ran the operation successfully.
1 The showVersion command failed to run because of an error to read the JAR file.
2 The showVersion command failed to run because of an invalid directory that is specified in the command line.
3 The showVersion command failed to run because of an error to retrieve the EAR file version from IBM® WebSphere® Application Server.
4 The showVersion command failed to run because of an incorrect parameter that is specified in the command line.
5 The showVersion command failed to run because there was not a JAR file that is specified in the -jarslocation parameter.