I'm trying to execute a command from Java (Oracle's loadjava command), and
I'm getting this error:
java.io.IOException: CreateProcess: loadjava error=2
at java.lang.Win32Process.create(Native Method)
at java.lang.Win32Process.<init>(Win32Process.java:66)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Runtime.java:551)
at java.lang.Runtime.exec(Runtime.java:418)
at java.lang.Runtime.exec(Runtime.java:361)
at java.lang.Runtime.exec(Runtime.java:325)
at LoadJavaWrapper.main(LoadJavaWrapper.java:21)
This error happens right after I get the runtime and then execute loadjava.
(I know I'm missing parameters for loadjava, I'm just trying to see if I can
execute it at all and get the output back.)
System.out.println("Getting Runtime");
Runtime runtime = Runtime.getRuntime();
System.out.println("Executing loadjava");
Process process = runtime.exec("loadjava");
I've done this before with JDK1.1 on Solaris, and now I'm using 1.3 on
Win2000. Is there something I'm missing in order to create a Win32Process?
My java.policy file includes the following for the default permissions, just
to get the permissions going:
permission java.security.AllPermission;
Is there something goofy about Win2000 that's different from Solaris, or is
it a difference in the JDK? I'm sure I'm missing something obvious.
Thanks,
Steve