This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Change system date  RSS feed

 
Chris Salivar
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 6037
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
...or if there is a command line arg you can cann to change the date, you can use Runtime.exec()...
Dave.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!