How can I change the System clock of a Linux machine by using Java?
I know that by using the command in the terminal
date --set="2011-12-07 01:20:15.962"
you would actually be able to change the System clock, so I tried it in
Java and came up with the following statement
Process p = Runtime.getRuntime().exec("date --set=\"2011-12-07
01:20:15.962\"");
but it was not able to set the clock.
Do you have any idea guys how it may be able work?
Premise: The machine is of Slackware The privilege is of root
No comments:
Post a Comment