public class Version
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
JDK_1_5
Deprecated.
Use
JavaSEPlatform instead. Will be removed in 2.7. |
static int |
JDK_1_6
Deprecated.
Use
JavaSEPlatform instead. Will be removed in 2.7. |
static int |
JDK_1_7
Deprecated.
Use
JavaSEPlatform instead. Will be removed in 2.7. |
static int |
JDK_1_8
Deprecated.
Use
JavaSEPlatform instead. Will be removed in 2.7. |
static int |
JDK_1_9
Deprecated.
Use
JavaSEPlatform instead. Will be removed in 2.7. |
static int |
JDK_VERSION
Deprecated.
Use
JavaSEPlatform instead. Will be removed in 2.7. |
static int |
JDK_VERSION_NOT_SET
Deprecated.
Use
JavaSEPlatform instead. Will be removed in 2.7. |
Constructor and Description |
---|
Version() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getBuildDate() |
static java.lang.String |
getBuildNumber() |
static java.lang.String |
getBuildRevision() |
static java.lang.String |
getBuildTime() |
static java.lang.String |
getBuildType() |
static int |
getJDKVersion()
Deprecated.
Use
JavaSEPlatform.CURRENT instead.
Will be removed in 2.7. |
static java.lang.String |
getProduct() |
static java.lang.String |
getQualifier() |
static java.lang.String |
getVersion() |
static java.lang.String |
getVersionString()
Returns version
String containing three part version number
and build qualifier. |
static boolean |
isJDK15()
Check whether we are running on Java SE 1.5.
|
static boolean |
isJDK16()
Check whether we are running on Java SE 1.6.
|
static boolean |
isJDK17()
Check whether we are running on Java SE 1.7.
|
static boolean |
isJDK18()
Check whether we are running on Java SE 1.8.
|
static boolean |
isJDK19()
Check whether we are running on Java SE 1.9.
|
static void |
main(java.lang.String[] args) |
static void |
printVersion() |
static void |
setProduct(java.lang.String ProductName) |
static void |
useJDK15()
Deprecated.
Use
JavaSEPlatform instead. Will be removed in 2.7. |
static void |
useJDK16()
Deprecated.
Use
JavaSEPlatform instead. Will be removed in 2.7. |
@Deprecated public static final int JDK_VERSION_NOT_SET
JavaSEPlatform
instead. Will be removed in 2.7.@Deprecated public static final int JDK_1_5
JavaSEPlatform
instead. Will be removed in 2.7.@Deprecated public static final int JDK_1_6
JavaSEPlatform
instead. Will be removed in 2.7.@Deprecated public static final int JDK_1_7
JavaSEPlatform
instead. Will be removed in 2.7.@Deprecated public static final int JDK_1_8
JavaSEPlatform
instead. Will be removed in 2.7.@Deprecated public static final int JDK_1_9
JavaSEPlatform
instead. Will be removed in 2.7.@Deprecated public static int JDK_VERSION
JavaSEPlatform
instead. Will be removed in 2.7.public static java.lang.String getVersionString()
String
containing three part version number
and build qualifier.String
.public static java.lang.String getProduct()
public static void setProduct(java.lang.String ProductName)
public static java.lang.String getVersion()
public static java.lang.String getQualifier()
public static java.lang.String getBuildNumber()
public static java.lang.String getBuildDate()
public static java.lang.String getBuildTime()
public static java.lang.String getBuildRevision()
public static java.lang.String getBuildType()
@Deprecated public static int getJDKVersion()
JavaSEPlatform.CURRENT
instead.
Will be removed in 2.7.@Deprecated public static void useJDK15()
JavaSEPlatform
instead. Will be removed in 2.7.java.lang.UnsupportedOperationException
- when invoked because Java SE 1.5
is not supported by current EclipseLink.@Deprecated public static void useJDK16()
JavaSEPlatform
instead. Will be removed in 2.7.java.lang.UnsupportedOperationException
- when invoked because Java SE 1.6
is not supported by current EclipseLink.public static boolean isJDK15()
false
because Java SE 1.5 is not
supported by current EclipseLink.true
when we do and value of false
when we do not run on Java SE 1.5.public static boolean isJDK16()
false
because Java SE 1.6 is not
supported by current EclipseLink.true
when we do and value of false
when we do not run on Java SE 1.6.public static boolean isJDK17()
true
when we do and value of false
when we do not run on Java SE 1.7.public static boolean isJDK18()
true
when we do and value of false
when we do not run on Java SE 1.8.public static boolean isJDK19()
true
when we do and value of false
when we do not run on Java SE 1.9.public static void printVersion()
public static void main(java.lang.String[] args)