public class Version extends 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 String |
getBuildDate() |
static String |
getBuildNumber() |
static String |
getBuildRevision() |
static String |
getBuildTime() |
static String |
getBuildType() |
static int |
getJDKVersion()
Deprecated.
Use
JavaSEPlatform.CURRENT instead.
Will be removed in 2.7. |
static String |
getProduct() |
static String |
getQualifier() |
static String |
getVersion() |
static 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(String[] args) |
static void |
printVersion() |
static void |
setProduct(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 String getVersionString()
String
containing three part version number
and build qualifier.String
.public static String getProduct()
public static void setProduct(String ProductName)
public static String getVersion()
public static String getQualifier()
public static String getBuildNumber()
public static String getBuildDate()
public static String getBuildTime()
public static String getBuildRevision()
public static 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.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.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(String[] args)