Example usage for org.apache.commons.lang3 SystemUtils JAVA_CLASS_VERSION

List of usage examples for org.apache.commons.lang3 SystemUtils JAVA_CLASS_VERSION

Introduction

In this page you can find the example usage for org.apache.commons.lang3 SystemUtils JAVA_CLASS_VERSION.

Prototype

String JAVA_CLASS_VERSION

To view the source code for org.apache.commons.lang3 SystemUtils JAVA_CLASS_VERSION.

Click Source Link

Document

The java.class.version System Property.

Usage

From source file:net.centro.rtb.monitoringcenter.infos.JvmInfo.java

public static JvmInfo create() {
    JvmInfo jvmInfo = new JvmInfo();

    jvmInfo.specVersion = SystemUtils.JAVA_SPECIFICATION_VERSION;
    jvmInfo.classVersion = SystemUtils.JAVA_CLASS_VERSION;
    jvmInfo.jreVersion = SystemUtils.JAVA_VERSION;
    jvmInfo.jreVendor = SystemUtils.JAVA_VENDOR;
    jvmInfo.vmName = SystemUtils.JAVA_VM_NAME;
    jvmInfo.vmVendor = SystemUtils.JAVA_VM_VENDOR;
    jvmInfo.vmVersion = SystemUtils.JAVA_VM_VERSION;

    RuntimeMXBean runtimeMXBean = ManagementFactory.getRuntimeMXBean();
    jvmInfo.inputArguments = new ArrayList<>(runtimeMXBean.getInputArguments());
    jvmInfo.startedTimestamp = new Date(runtimeMXBean.getStartTime());

    jvmInfo.defaultTimeZone = TimeZone.getDefault().getID();
    jvmInfo.defaultCharset = Charset.defaultCharset().displayName();

    return jvmInfo;
}