RE: [tcljava-user] exec command with Visual Cafe 4.5
Brought to you by:
mdejong
From: Mo D. <md...@cy...> - 2001-07-31 00:27:14
|
On Mon, 30 Jul 2001, Tam Huynh wrote: > I know i can source the script, but since i'm trying to execute a script > that loads a dll's, i have to use exec. Tclblend doesn't help me so i've > been using jacl. Humm, you do know that Tcl Blend from the CVS can be loaded into a running JVM, right? That might work better for what you want to do. Of course, you might have tried that already so feel free to ignore me :) > If I do the following java code, there's nothing wrong..so is it the jvm > still? > Process myProcess = Runtime.getRuntime().exec(cmd); But this is not what Jacl does. Jacl will run command.com and have it run a script. This is where the problem is showing up. This whole hack is needed because the exec() API provided no way to set the CWD. I read that Java 1.3 now provides this API. If you hacked Jacl to use this new API things would be much cleaner but it would only work with a 1.3 or newer JVM. Older JVMs need to use the command.com or cmd.exe hack. They also need to be free of bugs, which many are not. cheers Mo |