如何通过Java设置Linux的系统时间

不要使用Runtime.exec(String),使用Runtime.exec(String)系统时间不会被修改,使用Runtime.exec(String[]),例如:

rt.exec(new String[] { "date", "-s", "1 Dec 2009" } )

posted @ 2013-05-22 13:20  MagicLetters  阅读(555)  评论(0编辑  收藏  举报