I'm having problem getting this method to run executables on NT workstation. Is anyone aware of any problems with using this method? I have tried calling it from a servlet and a session bean eith the following code but neither appear to work. Runtime.getRuntime().exec("c:\\windows\\notepad"); Also, this code will need to be deployed to Solaris. what is the platform independent way of calling an executable, in particular how do you specify the root in an independent way?
Aaron, Did you try Runtime.getRuntime().exec("notepad.exe"); or Runtime.getRuntime().exec("c:\\winnt\\notepad.exe"); I believe Java in both NT and Unix/Linux will try to search all paths specified in the PATH environment variable. It is better not to put in paths in the exec() function.
posted 19 years ago
Edward, Did indeed and it worked. What a dork. Thanks for the relpy.
SCJP 1.0,1.1,2 SCJA 2
Trust God, but always tether your camel... to this tiny ad.