Java Code Examples for java.lang.management.RuntimeMXBean#getSpecVersion()

The following examples show how to use java.lang.management.RuntimeMXBean#getSpecVersion() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: EnvironmentInformation.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
/**
 * Gets the version of the JVM in the form "VM_Name - Vendor  - Spec/Version".
 *
 * @return The JVM version.
 */
public static String getJvmVersion() {
	try {
		final RuntimeMXBean bean = ManagementFactory.getRuntimeMXBean();
		return bean.getVmName() + " - " + bean.getVmVendor() + " - " + bean.getSpecVersion() + '/' + bean.getVmVersion();
	}
	catch (Throwable t) {
		return UNKNOWN;
	}
}
 
Example 2
Source File: EnvironmentInformation.java    From flink with Apache License 2.0 5 votes vote down vote up
/**
 * Gets the version of the JVM in the form "VM_Name - Vendor  - Spec/Version".
 *
 * @return The JVM version.
 */
public static String getJvmVersion() {
	try {
		final RuntimeMXBean bean = ManagementFactory.getRuntimeMXBean();
		return bean.getVmName() + " - " + bean.getVmVendor() + " - " + bean.getSpecVersion() + '/' + bean.getVmVersion();
	}
	catch (Throwable t) {
		return UNKNOWN;
	}
}
 
Example 3
Source File: EnvironmentInformation.java    From Mycat2 with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Gets the version of the JVM in the form "VM_Name - Vendor  - Spec/Version".
 *
 * @return The JVM version.
 */
public static String getJvmVersion() {
	try {
		final RuntimeMXBean bean = ManagementFactory.getRuntimeMXBean();
		return bean.getVmName() + " - " + bean.getVmVendor() + " - " + bean.getSpecVersion() + '/' + bean.getVmVersion();
	}
	catch (Throwable t) {
		return UNKNOWN;
	}
}
 
Example 4
Source File: EnvironmentInformation.java    From flink with Apache License 2.0 5 votes vote down vote up
/**
 * Gets the version of the JVM in the form "VM_Name - Vendor  - Spec/Version".
 *
 * @return The JVM version.
 */
public static String getJvmVersion() {
	try {
		final RuntimeMXBean bean = ManagementFactory.getRuntimeMXBean();
		return bean.getVmName() + " - " + bean.getVmVendor() + " - " + bean.getSpecVersion() + '/' + bean.getVmVersion();
	}
	catch (Throwable t) {
		return UNKNOWN;
	}
}