Re: [tcljava-dev] exec change
Brought to you by:
mdejong
From: Mo D. <su...@ba...> - 2002-01-03 20:31:40
|
On Thu, 03 Jan 2002 10:45:02 -0500 Shawn Boyce <sh...@qc...> wrote: > >The current exec code in src/jacl/tcl/lang/ExecCmd.java does this really > >scary/nasty hack that involves writing out tmp files and then execing > >sh on them. It would be better if we could just make use of this new > > > How does the new API help? Is it really necessary for the code to > specify the command shell > (command.com or sh)? For Windows, if I use the new API, do I need the > temporary files anymore? If you use the new API then the temp files will no longer be needed. The whole point of the hack was to work around the fact that you could not set the CWD when execing. > >exec API. Trick is, Jacl needs to continue to run on a JDK 1.1 system > >so one would need to invoke the method at runtime through an > >interface and compile the class only when compiling with a newer > >version of Java. It might be easier to try to invoke this method via > >the reflection interface. How does that sound? > > > I'll look into it. I'm not sure about the compilation part. If I use > reflection on java.lang.Runtime > to see if the new method exists, then the code will compile fine with > pre-1.3. That seems like the most simple approach to implement. cheers Mo |