problems with exec("rundll32.exe shell32.dll...")
Tue May 20 13:34:00 GMT 2003
> thanks but this hasn't worked either - in fact passing any
>file as the arg makes no difference(!), I don't think its
>even getting that far (altered the code to as below)
>I don't understand exactly how this could be going wrong,
>unless maybe "_" is somehow munged by Runtime.exec?
I wish getting up to speed on source code debugging of libgcj was
not quite such an alienating experience. I'm going to have to
learn GDB for a C++ project soon, so I'll get there...
Thats really the next step though.
You seem to be familiar with StringTokenizer(never used it), so
perhaps you can glean some wisdom from the implementation in the 3.3
public Process exec(String cmdline, String env, File dir)
StringTokenizer t = new StringTokenizer(cmdline);
String cmd = new String[t.countTokens()];
for (int i = 0; i < cmd.length; i++)
cmd[i] = t.nextToken();
return exec(cmd, env, dir);
public Process exec(String cmd, String env, File dir)
SecurityManager sm = securityManager; // Be thread-safe!
if (sm != null)
return execInternal(cmd, env, dir);
And then on to the actual implementation for Win32.
More information about the Java