Package com.sun.enterprise.util
Class JDK
- java.lang.Object
-
- com.sun.enterprise.util.JDK
-
public final class JDK extends Object
A simple class that fills a hole in the JDK. It parses out the version numbers of the JDK we are running. Example:1.6.0_u14 == major = 1 minor = 6, subminor = 0, update = 14
- Author:
- bnevins
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static intgetMajor()static intgetMinor()static intgetSubMinor()static intgetUpdate()static JDKgetVersion(String string)booleannewerOrEquals(JDK version)booleannewerThan(JDK version)static booleanok()See if the current JDK is legal for running GlassFishbooleanolderOrEquals(JDK version)booleanolderThan(JDK version)static StringtoStringStatic()No instances are allowed so it is pointless to override toString
-
-
-
Method Detail
-
ok
public static boolean ok()
See if the current JDK is legal for running GlassFish- Returns:
- true if the JDK is >= 1.6.0
-
getMajor
public static int getMajor()
-
getMinor
public static int getMinor()
-
getSubMinor
public static int getSubMinor()
-
getUpdate
public static int getUpdate()
-
newerThan
public boolean newerThan(JDK version)
-
newerOrEquals
public boolean newerOrEquals(JDK version)
-
olderThan
public boolean olderThan(JDK version)
-
olderOrEquals
public boolean olderOrEquals(JDK version)
-
toStringStatic
public static String toStringStatic()
No instances are allowed so it is pointless to override toString- Returns:
- Parsed version numbers
-
-