Setting the system time

Discussion in 'Java' started by Ivan Bout, Jul 18, 2005.

  1. Ivan Bout

    Ivan Bout Guest

    Hi all,

    Does anyone know how to set the system time for windows?

    I tried this command:

    Process p = Runtime.getRuntime().exec("command /c time 00:00:00");

    also tried:

    Process p = Runtime.getRuntime().exec("time 00:00:00");

    This works fine in cmd.exe but in my java program it won't set the time.

    Thanks

    Ivan
     
    Ivan Bout, Jul 18, 2005
    #1
    1. Advertising

  2. Ivan Bout

    Roedy Green Guest

    On Mon, 18 Jul 2005 11:44:08 +0200, Ivan Bout <> wrote or
    quoted :

    >Does anyone know how to set the system time for windows?
    >
    >I tried this command:
    >
    >Process p = Runtime.getRuntime().exec("command /c time 00:00:00");
    >
    >also tried:
    >
    >Process p = Runtime.getRuntime().exec("time 00:00:00");
    >
    >This works fine in cmd.exe but in my java program it won't set the time.
    >
    >Thanks


    see http://mindprod.com/applets.html#SETCLOCK source is provided.

    It requires JNI.
    --
    Bush crime family lost/embezzled $3 trillion from Pentagon.
    Complicit Bush-friendly media keeps mum. Rumsfeld confesses on video.
    http://www.infowars.com/articles/us/mckinney_grills_rumsfeld.htm

    Canadian Mind Products, Roedy Green.
    See http://mindprod.com/iraq.html photos of Bush's war crimes
     
    Roedy Green, Jul 18, 2005
    #2
    1. Advertising

  3. Ivan Bout

    IchBin Guest

    Roedy Green wrote:
    >
    > see http://mindprod.com/applets.html#SETCLOCK source is provided.
    >
    > It requires JNI.


    Sorry Roedy but the link seems to be bad.

    --


    Thanks in Advance...
    IchBin, Pocono Lake, Pa, USA http://weconsultants.servebeer.com
    __________________________________________________________________________

    ' If there is one, Knowledge is the "Fountain of Youth"'
    -William E. Taylor, Regular Guy (1952-)
     
    IchBin, Jul 18, 2005
    #3
  4. On Mon, 18 Jul 2005 12:23:57 -0400, IchBin wrote:

    > Roedy Green wrote:
    >>
    >> see http://mindprod.com/applets.html#SETCLOCK source is provided.
    >>
    >> It requires JNI.

    >
    > Sorry Roedy but the link seems to be bad.


    Try the mindprod search..
    <http://www.google.com/search?sitesearch=mindprod.com&q=applet+clock>

    HTH

    --
    Andrew Thompson
    physci.org 1point1c.org javasaver.com lensescapes.com athompson.info
    Known To Cause Insanity In Laboratory Mice
     
    Andrew Thompson, Jul 18, 2005
    #4
  5. Ivan Bout

    IchBin Guest

    Andrew Thompson wrote:
    > On Mon, 18 Jul 2005 12:23:57 -0400, IchBin wrote:
    >
    >> Roedy Green wrote:
    >>> see http://mindprod.com/applets.html#SETCLOCK source is provided.
    >>>
    >>> It requires JNI.

    >> Sorry Roedy but the link seems to be bad.

    >
    > Try the mindprod search..
    > <http://www.google.com/search?sitesearch=mindprod.com&q=applet+clock>
    >
    > HTH
    >

    Thanks...

    --


    Thanks in Advance...
    IchBin, Pocono Lake, Pa, USA http://weconsultants.servebeer.com
    __________________________________________________________________________

    ' If there is one, Knowledge is the "Fountain of Youth"'
    -William E. Taylor, Regular Guy (1952-)
     
    IchBin, Jul 18, 2005
    #5
    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. Lawrance
    Replies:
    0
    Views:
    464
    Lawrance
    Nov 30, 2003
  2. Srinivasa Raghavan Sethuraman
    Replies:
    0
    Views:
    562
    Srinivasa Raghavan Sethuraman
    Jun 30, 2004
  3. Ken Adams

    Setting the System Time.

    Ken Adams, Feb 25, 2005, in forum: Java
    Replies:
    2
    Views:
    358
    Alun Harford
    Feb 25, 2005
  4. flamesrock
    Replies:
    8
    Views:
    476
    Hendrik van Rooyen
    Nov 24, 2006
  5. Tzury

    Setting System Date And Time

    Tzury, Mar 13, 2007, in forum: Python
    Replies:
    0
    Views:
    292
    Tzury
    Mar 13, 2007
Loading...

Share This Page