Get system start time from RuntimeMXBean : RuntimeMXBean « Development Class « Java






Get system start time from RuntimeMXBean



import java.lang.management.ManagementFactory;
import java.lang.management.RuntimeMXBean;
import java.util.Date;

public class Main {
  public static void main(String args[]) throws Exception {
    RuntimeMXBean mx = ManagementFactory.getRuntimeMXBean();
    System.out.println(new Date(mx.getStartTime()));
  }
}

 








Related examples in the same category

1.Get the system properties from RuntimeMXBean
2.Get the JVM uptime from RuntimeMXBean
3.Get ClassPath from RuntimeMXBean
4.Get Boot path from RuntimeMXBean
5.ManagementFactory.getRuntimeMXBean()
6.RuntimeMXBean.getBootClassPath()
7.RuntimeMXBean.getClassPath()
8.RuntimeMXBean.getInputArguments()
9.RuntimeMXBean.getSystemProperties()
10.RuntimeMXBean.getStartTime()
11.RuntimeMXBean.getUptime()