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

The following examples show how to use java.lang.management.RuntimeMXBean#getVmVendor() . 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: PitError.java    From pitest with Apache License 2.0 6 votes vote down vote up
private static String info() {
  final RuntimeMXBean rt = ManagementFactory.getRuntimeMXBean();

  return "\n\nPlease copy and paste the information and the complete stacktrace below when reporting an issue\n"
  + "VM : "
  + rt.getVmName()
  + "\n"
  + "Vendor : "
  + rt.getVmVendor()
  + "\n"
  + "Version : "
  + rt.getVmVersion()
  + "\n"
  + "Uptime : "
  + rt.getUptime()
  + "\n"
  + "Input -> "
  + createInputString(rt.getInputArguments())
  + "\n"
  + "BootClassPathSupported : " + rt.isBootClassPathSupported() + "\n";

}
 
Example 2
Source File: OperatingSystemInfoUtil.java    From Deta_Cache with Apache License 2.0 5 votes vote down vote up
/**
	 * Java �����������ʱϵͳ
	 */
	public static Map<String, String>  showJvmInfo() {
		Map<String, String> map = new HashMap<>();
		RuntimeMXBean mxbean = ManagementFactory.getRuntimeMXBean();
		String vendor = mxbean.getVmVendor();
		map.put("jvm name:", mxbean.getVmName());
		map.put("jvm version:", mxbean.getVmVersion());
		map.put("jvm bootClassPath:", mxbean.getBootClassPath());
		map.put("jvm start time:", "" + mxbean.getStartTime());
		return map;	
//		System.out.println("jvm name:" + mxbean.getVmName());
//		System.out.println("jvm version:" + mxbean.getVmVersion());
//		System.out.println("jvm bootClassPath:" + mxbean.getBootClassPath());
//		System.out.println("jvm start time:" + mxbean.getStartTime());
	}
 
Example 3
Source File: OperatingSystemInfoUtil.java    From Deta_Cache with Apache License 2.0 5 votes vote down vote up
/**
	 * ���� MXBean �ķ��������ַ���
	 */
	public static  Map<String, String> visitMBean(){
		Map<String, String> map = new HashMap<>();
		RuntimeMXBean mxbean = ManagementFactory.getRuntimeMXBean();
		String vendor1 = mxbean.getVmVendor();
//		System.out.println("vendor1:" + vendor1);
		map.put("vendor1:", vendor1);
		return map;		
	}
 
Example 4
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 5
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 6
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 7
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;
	}
}