How to set system clock in java

Discussion in 'Java' started by Jonas Hei, Jan 21, 2005.

  1. Jonas Hei

    Jonas Hei Guest

    It probably is a daft question - but please can anyone tell how to set
    system date using the java api (by setting system date I mean the
    computer's clock. For example, in win32 api SetSystemTime(const
    SYSTEMTIME* lpSystemTime) would set the current datetime and in C
    runtime library (at least on some linux) adjtime() would do so)
     
    Jonas Hei, Jan 21, 2005
    #1
    1. Advertising

  2. On Fri, 21 Jan 2005 16:41:05 +0000, Jonas Hei wrote:
    > It probably is a daft question - but please can anyone tell how to set
    > system date using the java api (by setting system date I mean the
    > computer's clock. For example, in win32 api SetSystemTime(const
    > SYSTEMTIME* lpSystemTime) would set the current datetime and in C
    > runtime library (at least on some linux) adjtime() would do so)


    JNI. Define a native method to invoke the appropriate system function.

    /gordon

    --
    [ do not email me copies of your followups ]
    g o r d o n + n e w s @ b a l d e r 1 3 . s e
     
    Gordon Beaton, Jan 22, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Valentin Tihomirov

    Are clock and divided clock synchronous?

    Valentin Tihomirov, Oct 23, 2003, in forum: VHDL
    Replies:
    11
    Views:
    3,299
    louis lin
    Oct 28, 2003
  2. Replies:
    4
    Views:
    724
    Peter Alfke
    Apr 27, 2006
  3. Replies:
    5
    Views:
    2,175
    Ricardo
    Jun 23, 2006
  4. himassk
    Replies:
    1
    Views:
    1,236
    Paul Uiterlinden
    May 16, 2007
  5. pankaj.goel
    Replies:
    6
    Views:
    941
    pankaj.goel
    Nov 25, 2008
Loading...

Share This Page