type=page
status=published
title=version
next=manvol1m.html
prev=verify-domain-xml.html
~~~~~~
version
=======

[[version-1]][[GSRFM00261]][[version]]

version
-------

displays version information for\{product---name}

[[sthref2347]]

Synopsis

[source,oac_no_warn]
----
asadmin [asadmin-options] version [--help] 
[--verbose={false|true}] 
[--local={false|true}]
----

[[sthref2348]]

Description

The `version` subcommand displays version information for
\{product---name}. By default, if the subcommand cannot contact the
domain administration server (DAS), the subcommand retrieves the version
information locally and displays a warning message.

This subcommand is supported in remote mode and local mode.

[[sthref2349]]

Options

asadmin-options::
  Options for the `asadmin` utility. For information about these
  options, see the link:asadmin.html#asadmin-1m[`asadmin`(1M)] help page.
`--help`::
`-?`::
  Displays the help text for the subcommand.
`--verbose`::
`-v`::
  If this option is set to `true`, the subcommand provides the version
  of the Java Runtime Environment (JRE) that the server is running. The
  default is `false`.
`--local`::
  If this option is set to `true`, the subcommand obtains the version
  locally from the installation of \{product---name} on the host where
  the subcommand is run. +
  If this option is set to `false` (default), the subcommand attempts to
  contact the DAS to obtain the version. If the attempt to contact the
  DAS fails, the subcommand retrieves the version locally and displays a
  warning message.

[[sthref2350]]

Examples

[[GSRFM800]][[sthref2351]]

Example 1   Obtaining Version Information From a Running DAS

[source,oac_no_warn]
----
asadmin> version
Version = Oracle GlassFish Server 3.1 (build 34)
Command version executed successfully.
----

[[GSRFM801]][[sthref2352]]

Example 2   Obtaining Version Information When the DAS Cannot be Reached

[source,oac_no_warn]
----
asadmin> version
Version string could not be obtained from Server [localhost:4848] for some reason.
(Turn debugging on e.g. by setting AS_DEBUG=true in your environment, to see the
 details).
Using locally retrieved version string from version class.
Version = Oracle GlassFish Server 3.1 (build 34)
Command version executed successfully.
----

[[GSRFM802]][[sthref2353]]

Example 3   Obtaining Version Information Locally

[source,oac_no_warn]
----
asadmin> version --local
Using locally retrieved version string from version class.
Version = Oracle GlassFish Server 3.1 (build 34)
Command version executed successfully.
----

[[sthref2354]]

Exit Status

0::
  subcommand executed successfully
1::
  error in executing the subcommand

[[sthref2355]]

See Also

link:asadmin.html#asadmin-1m[`asadmin`(1M)]

link:list-modules.html#list-modules-1[`list-modules`(1)]


