my dog learned polymorphism
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

JavaRanch » Java Forums » Java » Java in General
Bookmark "Change system date" Watch "Change system date" New topic

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?
- Chris
Mark Herschberg

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.
David O'Meara

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()...
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Change system date
jQuery in Action, 3rd edition