views:

444

answers:

2

Is there a OS-neutral method of querying for system (not JVM - I am aware of RuntimeMXBean.getUptime()) uptime in JavaSE 6 ?

Thanks

+1  A: 

Yes and no.

  • There are system specific ways of querying uptime (e.g. uptime on *nix)
  • There are ways to detect the operating system.
  • There is a small finite number of likely operating systems.
  • And you're in a general purpose programming environment, so...
MarkusQ
A: 

so it shoudln't be a big deal that they implement it, since they are writting specific JRE for each platform, which is aware of uptime() version for each OS, and they could easily wrap it into some java call, like getSystemUptime()

burek