This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Java in General and the fly likes Change system date Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Change system date" Watch "Change system date" New topic
Author

Change system date

Chris Salivar
Ranch Hand

Joined: May 25, 2001
Posts: 34
Can anybody tell me if its possible to change the windows system date using java and if yes then how?
TIA
- Chris
Mark Herschberg
Sheriff

Joined: Dec 04, 2000
Posts: 6037
Java itself cannot change that type of property. However, if there is some dll which allows you to do it, you can access the methods through JNI.
--Mark
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

...or if there is a command line arg you can cann to change the date, you can use Runtime.exec()...
Dave.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Change system date
 
Similar Threads
Need help.
JSP is recompiling on every request
Regarding the date obtained using java.util.Date class
problem in date
Friday the 13th