SYSTEM:RUN-PROGRAM does not work on Java 5/6
|Reported by:||mevenson||Owned by:||mevenson|
|Keywords:||cffi sys:run-program java-5 java-6||Cc:||epipping|
In chasing down the errors with CFFI on CL-TEST-GRID <https://mailman.common-lisp.net/pipermail/armedbear-devel/2016-October/003719.html>, I have found that the [java.lang.ProcessBuilder?$Redirect] interface used by Elias and Olof to extend SYS:RUN-PROGRAM for different types of I/O abstractions was introduced with Java 7, and will hence not work on earlier Java implementations.
Invoking ABCL-ASDF:ENSURE-MVN-VERSION, the following form causes the error
(JFIELD "java.lang.ProcessBuilder$Redirect" "INHERIT")
TODO: investigate the Java 6 APIs to see if there is a way to do I/O redirection with backwards compatibility. I currently suspect that there is no way to support Java 5/6 for this usage, which is why we never implemented I/O redirection previously.
There is undoubtedly a way re-write the SYS:RUN-PROGRAM interface so that we may invoke a process to read its output as a string in Java 5/Java 6, as it worked before. But we will have to figure out a way to advertise the different features of SYS:RUN-PROGRAM depending on the hosting VM.
Longer term, we may want to deprecate Java 5/6, but I would really have the compiler emit Java 7-compatible bytecode (mainly by passing the Java 6 verification process) before we begin that.
Change History (11)
Changed 5 months ago by mevenson
comment:4 Changed 5 months ago by mevenson
- Milestone changed from 1.5.0 to 1.4.1
- Owner set to mevenson
- Priority changed from major to blocker
- Status changed from new to assigned
comment:5 Changed 5 months ago by epipping
- Cc epipping added
- Keywords sys:run-program added; sys:run-progrom removed