Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Faking/Altering system time with JVM

843811Sep 22 2004 — edited Feb 28 2006
odd question but...

Does anybody know of a way to fake/alter the system time read by the Data/System classes? For example, if I want to pretend it is next year. Can I alter the date for all applications running in that JVM? Feels like a jvm option (didn't find any that match up).

Realise that the clock on the machine (solaris) could be changed but I want to isolate the time shift to a particular JVM or Unix shell instance.


thanks / Matthew
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 28 2006
Added on Sep 22 2004
8 comments
1,510 views