Is there a way to find out the time since the JVM started?
Of course, other than starting a timer somewhere near the beginning of main, because in my sc
Starting from Java 5, you can use JMX to find this out. Check "Using the platform MBeanserver" to find out more details. The bean you're looking for is the bean called "java.lang:type=Runtime". The attribute StartTime gives you the time the JVM was started and the Uptime attribute tells you the uptime of the JVM.
You can get a reference to the Runtime bean by executing this code:
ManagementFactory.getRuntimeMXBean();