runtime.exec fails on XP

Discussion in 'Java' started by CDJ, Jul 8, 2003.

  1. CDJ

    CDJ Guest

    Hi,
    I have a problem with runtime.exec on XP. it works fine on W2K.
    I get no exit value as the process does not get created.

    Anyone got any ideas.I am doing this to get hold of the parameters passed from html

    thanks
    CDJ

    public static final String Cmd = "cmd /c set";
    Runtime runtime = Runtime.getRuntime();
    Process pid;
    try
    {
    pid = runtime.exec(Cmd);
    }
    catch (IOException e)
    {
    System.out.println("Content-Type: text/html");
    System.out.println("Picture download failed:S");
    System.out.println("<br>");
    System.out.println(e.getMessage());
    System.out.println("<br>");
    System.out.println(e.toString());
    e.printStackTrace(System.out);
    System.out.flush();
    throw e;
    }

    CreateProcess
    java.io.IOException: CreateProcess

    java.io.IOException: CreateProcess
    at java/lang/Win32Process.shellExec
    at java/lang/Win32Process.
    at java/lang/Runtime.execInternal
    at java/lang/Runtime.exec
    at java/lang/Runtime.exec
    at Environment.
    at Packager.GetUser
    at Packager.main
    CDJ, Jul 8, 2003
    #1
    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. Jakir
    Replies:
    4
    Views:
    3,211
    Jakir
    Sep 1, 2004
  2. Hal Vaughan
    Replies:
    11
    Views:
    1,091
    Gordon Beaton
    May 22, 2006
  3. Replies:
    0
    Views:
    424
  4. Replies:
    1
    Views:
    516
    Andreas Leitgeb
    Nov 30, 2006
  5. Lionel
    Replies:
    36
    Views:
    2,153
    Nigel Wade
    Dec 5, 2007
Loading...

Share This Page