Timothy,
Thanks ! I solved the issue. It was my error. I built my java with jdk
1.5, but run it on java 1.4.
Sorry for wasting your time.
- Ron
Timothy Wall wrote:
I've gotten this to work on OSX with seemingly irrelevant tweaking
(the code as posted didn't work initially), so it might be a timing
issue with resource conflicts.
Attached a version that works for me on OSX.
On Aug 19, 2008, at 1:10 PM, rzo wrote:
Daniel,
thanks for the reply.
Concerning " the JVM does not expect this to happen": Why would the
JVM not expect this to happen ? Take a look at the implementation of
Runtime.exec(). It is implemented using JNI call to fork/execv.
Given that the java Process class does work as I expect it, I have
reimplemented it using JNA.
With JNA I hope that I can keep my c-compiler and linker in the
cupboard.
For windows JNA does a perfect job.
I am now trying to implement the same for Linux/Unix.
As stated, the fork works fine. A second process is spawned.
However, execv does not seem to work.
There is a thread on this mail list with a similar issue. However it
seems that the issue was not solved.