runtime.exec fails on XP

C

CDJ

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,007
Latest member
obedient dusk

Latest Threads

Top