Request for system health (not JVM) in Java

Is there a method to neutralize the OS for the system (and not the JVM - I know RuntimeMXBean.getUptime ()) uptime in JavaSE 6?

thanks

+4
source share
2 answers

Yes and no.

  • There are system methods for requesting uptime (for example, uptime on * nix)
  • There are ways to determine the operating system .
  • There are a small finite number of likely operating systems.
  • And you are in a general environment, so ...
+2
source

therefore, they will not have much success in their implementation, since they write out a specific JRE for each platform that knows the uptime () version for each OS, and they can easily wrap it in some java call like getSystemUptime ()

-one
source

All Articles