com.atlassian.jira.util.system.check
Class JvmVersionUtil
java.lang.Object
com.atlassian.jira.util.system.check.JvmVersionUtil
public class JvmVersionUtil
- extends Object
A utility class for retreiving the various parts of a Java version
- Since:
- v4.0
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JAVA_VERSION_6
public static final String JAVA_VERSION_6
- See Also:
- Constant Field Values
JAVA_VERSION_5
public static final String JAVA_VERSION_5
- See Also:
- Constant Field Values
JvmVersionUtil
public JvmVersionUtil()
getMajorVersion
public int getMajorVersion(String javaVersion)
- Parameters:
javaVersion
- the full Java version string
- Returns:
- the Major version of the Java string, e.g. "1.6.0_10_b3" will return 6 or -1 if the version can not be read
getMinorVersion
public int getMinorVersion(String javaVersion)
- Parameters:
javaVersion
- the full Java version string
- Returns:
- the Minor version of the Java string, e.g. "1.6.0_10_b3" will return 10 or -1 if the version can not be read
getBuildNumber
public int getBuildNumber(String javaVersion)
- Parameters:
javaVersion
- the full Java version string
- Returns:
- the build number of the Java string, e.g. "1.6.0_10_b3" will return 3 or -1 if the version can not be read
Copyright © 2002-2011 Atlassian. All Rights Reserved.