Possible Duplicate:
How can I set the System Time in Java?
I want to set the system time from a Java program. I've been googling and the only solution I found involves Runtime.exec
. This has the really fat disadvantage that Windows also has no reasonable system command to set the system time (e.g. how do I get the date locale?).
I am now using winapi through jna
. This is fun (no irony).
Now I wondered if no one ever bothered to make an OS independent Java library to set the system time. The question seems to come up often enough.