public class JavaVMVersionToolkit extends Object
Constructor and Description |
---|
JavaVMVersionToolkit() |
Modifier and Type | Method and Description |
---|---|
static String |
decodeJavaVersion(String vmVersion)
Since Sun decided not to have java.specification.version as a performance counter, we need to
try to decode the specification version from the VM version.
|
static boolean |
isHotspotJVMName(String vmName)
Returns whether this is a HotSpot JVM or not.
|
static boolean |
isJRockitJVMName(String vmName)
Returns whether this is a JRockit JVM or not.
|
static String |
parseJavaVersion(String version)
Parses version string to find java version, such as 1.6.
|
public static String decodeJavaVersion(String vmVersion)
vmVersion
- the full VM version.public static String parseJavaVersion(String version)
version
- A string that may contain a java versionpublic static boolean isJRockitJVMName(String vmName)
vmName
- the JVM name to check.public static boolean isHotspotJVMName(String vmName)
vmName
- the JVM name to check.Copyright © 2020. All rights reserved.