[tcljava-dev] exec change
Brought to you by:
mdejong
From: Shawn B. <sh...@qc...> - 2002-01-03 15:45:06
|
Mo DeJong wrote: >There are not a lot of features left to implement, but the >ones that are left can be rather tricky. Perhaps a good >place to get started with the code would be in the >exec command. A new version of the exec() API was > Fine. > >added in JDK 1.3: > >http://java.sun.com/j2se/1.3/docs/api/java/lang/Runtime.html#exec(java.lang.String[], java.lang.String[], java.io.File) > >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? > >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. > > >If you want a bigger challenge after that, the automated test cases >could use a lot of work. > >Mo > >_______________________________________________ >tcljava-dev mailing list >tcl...@li... >https://lists.sourceforge.net/lists/listinfo/tcljava-dev > > -- -Shawn |