public class Version extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
PROP_BUILD_DATE
Version property whose value is the date when this version of the product was built.
|
static String |
PROP_BUILD_JDK_VENDOR
Version property whose value is the vendor of the JDK that built this version of the product.
|
static String |
PROP_BUILD_JDK_VERSION
Version property whose value is the version of the JDK that built this version of the product.
|
static String |
PROP_BUILD_NUMBER
Version property whose value is the source code revision number used to make the build.
|
static String |
PROP_BUILD_OS_NAME
Version property whose value identifies the build machine's operating system.
|
static String |
PROP_BUILD_OS_VERSION
Version property whose value is the build machine's operating system version.
|
static String |
PROP_PRODUCT_NAME
Version property whose value is the product name.
|
static String |
PROP_PRODUCT_VERSION
Version property whose value is the product version.
|
| Constructor and Description |
|---|
Version() |
| Modifier and Type | Method and Description |
|---|---|
static String |
getBuildDate()
Returns just the product build date.
|
static String |
getBuildNumber()
Returns just the product build number.
|
static String |
getProductName()
Returns just the product name.
|
static String |
getProductNameAndVersion()
Returns the product name and its version string.
|
static String |
getProductNameAndVersionBuildInfo()
Returns the product name and its version string, with more build details about the version.
|
static String |
getProductVersion()
Returns just the product version.
|
static Properties |
getVersionProperties()
Returns a set of properties that can be used to identify this version of the product.
|
static String |
getVersionPropertiesAsString()
Returns the version properties in a single string with all properties on a single line separated with a newline.
|
static void |
main(String[] args)
A main method that can be used to determine the version information from a command line.
|
public static final String PROP_PRODUCT_NAME
public static final String PROP_PRODUCT_VERSION
public static final String PROP_BUILD_NUMBER
public static final String PROP_BUILD_DATE
public static final String PROP_BUILD_JDK_VENDOR
public static final String PROP_BUILD_JDK_VERSION
public static final String PROP_BUILD_OS_NAME
public static final String PROP_BUILD_OS_VERSION
public static void main(String[] args)
args - the version properties to print to stdout; if no arguments are given then all version properties are
printedpublic static String getProductNameAndVersion()
public static String getProductNameAndVersionBuildInfo()
public static String getProductName()
public static String getProductVersion()
public static String getBuildDate()
public static String getBuildNumber()
public static Properties getVersionProperties()
RuntimeException - if there is no version info found in the current thread's class loaderpublic static String getVersionPropertiesAsString()
Copyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.